Stuff I Liked or Use

Take it easy, but take it.

Unix one-liners

without comments


Moving data with tar:
(cd mydata; tar cvf - *) | tar xvpBf -
Note:  Really, you want to use cpio for this.  Different versions of tar have different ugly limits.  If you can, use your filesytem-specific command (ufsdump, qfsdump, etc), but if you're moving between filesystems, seriously consider cpio.  But even then it's still often called the 'back to back tar' ; )

Same idea, toss in an rsh/ssh
tar cvf - mydata | rsh server01 "cd /pub/data; tar xvpBf -"

Process info:
/usr/ucb/ps auxww  (show full command line - that is, show the full command line of each process)

# awk, print usernames where uid < 100
awk -F: '($2 < 100) '{print $1}' /etc/passwd

AIX: remove a tape drive/library from the OS
     list the device names 'lsdev -Cc tape'
     remove the devices :
	rmdev -dl rmtX
	rmdev -dl smcX
     once devices are removed, run 'cfgmgr' and wait for the OS to reload drives (like running devfsadm in solaris)

errpt |more

installp -aX -d /tmp_install/apars
instfix -i | grep  to see if a fix is installed
lslpp -l bos.rte.lvm  
oslevel -r  # show ML

instfix -k IY39493 -d /tmp_install/apar/aixapar  # to install a fix

Written by Brad

August 20th, 2008 at 1:35 am

Posted in Uncategorized

Leave a Reply