Академический Документы
Профессиональный Документы
Культура Документы
Search
BigCalm AIX UNIX Handy AIX Commands
INTRODUCTION
This is my unix command help file which has been built up over the years. This file was built primarily for my own reference
and is not intended to be an authoratative guide to all commands for AIX - often if there is a very short description for a
command, you can take this as RTFM. I am not a systems administrator, but have been called on to do the job occasionally
(and install a box or two) - this helpfile should be ideal for people who use AIX, but aren't responsible for the deep magic
required for hardware configuration.
You may find this file helpful despite the numerous omissions nonetheless. This file was originally a plain text file but I have
converted to HTML using Lemmy (A vi clone for Windows).
Because it has been hand-converted from the original text document, there's a few hangovers from it that I just can't be
bothered to remove such as the caps headings. Additionally, some browsers may not render certain characters.
I've tried (and quite probably failed) to keep several conventions within this document - any command, if mentioned in the
description of another command should have a bookmark link to the description of that command; all examples are in blue
text - apologies to lynx users, but examples should be written so that they're recognisable anyway (and if you're using lynx,
you probably know unix quite well anyway so I don't really know why I'm apologising ;-). If a command has more than one
…tripod.com/aix/handycommands.htm 1/19
4/15/2011 Unix Commands for AIX
useful option, I've tried to put them into <UL> Unordered list tags.
If a command stands almost alone, or is complex within itself, it doesn't appear in this file but in it's own separate file (with a
link if I've converted it to html. Examples are vi and awk.
ls
- list files in directory; use with options
-l (long format)
-a (list . files too)
-r (reverse order)
-t (newest appears first)
-d (do not go beyond current directory)
-i (show inodes)
more
- used to control input by pages - like the dos /p argument with dir. e.g.
$ more /etc/motd
*******************************************************************************
**
**
* Welcome to AIX Version 4.1! *
**
**
* Please see the README file in /usr/lpp/bos for information pertinent to *
* this release of the AIX Operating System. *
**
**
*******************************************************************************
motd: END
b (back a page)
' (go to top)
v (vi the file)
/ (Search)
q (quit)
' ' (down a page)
Control-G (View current line number
<CR> (down a line)
pg
…tripod.com/aix/handycommands.htm 2/19
4/15/2011 Unix Commands for AIX
- used to control input by pages - like the dos /p argument. pg performs the same function as the more command but
has different control, as it is based on ex
Helpful keys for pg:
1 (go to top)
$ (go to bottom)
h (help)
/ (Search)
? (Search back)
q (quit)
-1 (back a page)
pwd
- show present working directory. e.g.
$ pwd
/usr/live/data/epx/vss2
cd
- change directory (without arguments, this is the same as $ cd $HOME or $ cd ~)
cp
<source> <destination> - copies a file from one location to another. e.g.
$ cp /etc/hosts /etc/hosts.backup # make a backup of the hosts file
$ cp /etc/motd /tmp/jon/ # Copy file /etc/motd to directory /tmp/jon/
Options
synonym: copy
mv
<source> <destination> - move a file from one location to another. e.g.
$ mv /tmp/jon/handycommands.txt . # move handycommands in /tmp/jon to current directory
$ mv -f vihelp vihelp.txt # Move file vihelp to vihelp.txt (forced)
Options
synonym: move
.
rm
<filename> - removes a file. e.g.
$ rm /tmp/jon/*.unl # remove all *.unl files in /tmp/jon
$ rm -r /tmp/jon/usr # remove all files recursively Options
du
Recursively lists directories and their sizes. e.g.
$ du /etc # list recursively all directories off /etc
712 /etc/objrepos
64 /etc/security/audit
536 /etc/security
104 /etc/uucp
8 /etc/vg
232 /etc/lpp/diagnostics/data
240 /etc/lpp/diagnostics
248 /etc/lpp
16 /etc/aliasesDB
16 /etc/acct
8 /etc/ncs
8 /etc/sm
8 /etc/sm.bak
4384 /etc
The sizes displayed are in 512K blocks. To view this in 1024K blocks use the option -k
lp -d<Printername> <Filename>
send file to printer. e.g. $ lp -dhplas14 /etc/motd # send file /etc/motd to printer hplas14
$ lp /etc/motd # send file /etc/motd to default printer
cat
- print a file to stdout (screen). e.g.
$ cat /etc/motd # display file /etc/motd to screen
*******************************************************************************
**
**
* Welcome to AIX Version 4.1! *
**
**
* Please see the README file in /usr/lpp/bos for information pertinent to *
* this release of the AIX Operating System. *
**
**
*******************************************************************************
cat is also useful for concatenating several files. e.g.
$ cat fontfile IN* > newfile # appends fontfile and all files beginning with IN to newfile
Though this might seem an essentially useless command, because most unix commands always take a filename
argument, it does in fact come in extremely useful at more advanced levels. Awards are given out occasionally for the
most useless usage of cat. If an option of '-' is specified, cat will take its input from stdin.
Unix commands generally get their information from the screen, and output to it. There are three main 'streams' which
unix uses to get/place it's information on. These streams are called:
…tripod.com/aix/handycommands.htm 4/19
4/15/2011 Unix Commands for AIX
stdin (Standard Input) - normally, what you type into the screen
stdout (Standard Output) - normally, what is output to the screen
stderr (Standard Error) - normally, error messages which go to the screen
< <filename> take input from <filename> rather than the screen. e.g.
$ ksh < x # will read all commands from the file x and execute them using the Korn shell.
> <filename> take output from the command and place it in <filename>. e.g.
$ ls > x will place the output of the command 'ls' in the file x
>> <filename> take output from the command and append it to <filename>. e.g.
$ ls /tmp >> x will place the output of the command 'ls' and append it to the file x
2> <filename> take any error messages from the command and put it in <filename>. e.g.
$ ls /tmp 2>/dev/null would throw away any error messages that are produced by ls (sorry, /dev/null is a file
that, if written to, the information disappears never to be seen again).
command1 | command2 Pipe - Takes the standard output of the first command, and turns it into the standard
input of the second command. The output of the second command will then be put on the standard output
(which, again, may be a pipe) e.g.
$ ls | more will send the output of 'ls' into the command 'more', thus producing a directory listing which stops
after every page. This method is called piping.
command1 & - the ampersand (&) forces command1 to run in the background. so that you may continue to type other
commands in the shell, while command1 executes. It is not advisable to run a command in the background if it outputs
to the screen, or takes it's input from the screen
See also tee which allows splitting of the input stream and output to several different places at once.
Wildcards
There are various wildcards which you may use. One is '*' which means 0 or more characters. e.g. 'B*' will match
'B,Bib and Baby' from the list above, another wildcard is '?' which matches 1 character, e.g. '?ib' will match 'Bib and
Fib'. Wildcards differ depending on the program in use: awk derivatives (awk,sed,grep,ex,vi,expr and others) have the
following special characters:
…tripod.com/aix/handycommands.htm 5/19
4/15/2011 Unix Commands for AIX
Chargeable calls out of bundle: $20.50
Other bundle charges: $0.00
Total Charge: $20.50
$ grep "^Charg.*bundle.*\$.*"
would match the first two lines.
In english - match all lines which start with 'Charg', then have any number of characters and then the word 'bundle',
then have any number of characters, and then a dollar symbol, and then have any number of characters following to the
end of the line
type <command>
- show where the source of a command is: e.g.
$ type sendmail
sendmail is /usr/sbin/sendmail
This command is merely an alias for 'whence -v'
whence <command>
- show where the source of a command is: shell builtin command. See type
Use option: -v for verbose mode
which <command>
- show where the source of a command is held. Almost the same as type and whence
rmdir <Directory>
- this is crap - use rm -r instead
mkdir <Directory>
- Creates a directory. e.g.
$ mkdir /tmp/jon/ # create directory called /tmp/jon/
-atime +<days> - finds files that haven't been accessed for 1+days also, ctime (creation time) and mtime
(modify time)
-prune - stay in current directory - don't look in dirs off the directory specified in path names - e.g.
$ find /tmp -user "compgnc" -prune -print # will find all files in /tmp which user compgnc owns and will not
search lower directories (e.g. /tmp/usr)
-size +<blocks> - finds files that are bigger than <blocks>
-exec rm {} \; - remove all files found...dangerous command - e.g.
$ find /tmp -name "sl.*" -atime +0 -prune -print -exec rm {} \; # will remove all files in /tmp starting 'sl.' that
haven't been accessed for a day. Spacing of this command is important! Most exec commands are possible:
$ find /usr2/calltest -name "*.4gl" -print -exec grep "CHECK" {} \; | pg
-ok - like exec only it prompts for confirmation after each occurence. e.g.
$ find /tmp/disk7 -name "*" -print -ok doswrite -a {} {} \; # Please note that you MUST end any exec or ok
option with an escaped semicolon (\;).
-user <username> - finds all files owned by <username>
-group <groupname> - finds all files with a group of <groupname>
…tripod.com/aix/handycommands.htm 7/19
4/15/2011 Unix Commands for AIX
tail -<Number> <FileName>
- prints out the end of a file. Very similar to head but with a very useful option '-f' which allows you to follow the end of
a file as it is being created.e.g.
$ tail -f vlink.log # follow end of vlink.log file as it is created.
wc -<options> <FileName>
- Word Count (wc) program. Counts the number of chars, words, and lines in a file or in a pipe. Options:
-l (lines)
-c (chars)
-w (words)
od <options> <filename>
- od converts nasty (binary save) files into character representations. Useful when back-compiling, examining raw .dat
files,etc. Use with option '-c' for character display (recommended).
script
- starts recording everything in the shell to a file by default 'typescript'. Press ^D to finish the script. Provides a log of
everything used. Has almost the same effect as $ ksh | tee typescript
Used for debugging shells, seeing error messages which flash off the screen too quickly, etc.
cut
- cut's the file or pipe into various fields. e.g.
$ cut -d "|" -f1,2,3 active.unl # will take the file active.unl which is delimited by pipe symbols and print the first 3 fields
options:
-d <delimiter>
-f <fields>
Not too useful as you can't specify the delimiter as merely white space (defaults to tab) Alternatively, you can 'cut' up
files by character positioning (useful with a fixed width file). e.g.
$ cut -c8-28 "barcode.txt" # would cut columns 8 to 28 out of the barcode.txt file.
paste
- paste will join two files together horizontally rather than just tacking one on to the end of the other. e.g. If you had
one file with two lines:
Name:
Employee Number:
and another file with the lines:
Fred Bloggs
…tripod.com/aix/handycommands.htm 8/19
4/15/2011 Unix Commands for AIX
E666
then by doing:
$ paste file1 file2 > file3 # this would then produce (in file3).
Name: Fred Bloggs
Employee Number: E666
Note that paste puts horizontal tabs between the files, so you may need a sed 's/ //g' command to get rid of these.
sort <filename>
- sorts the information from the file and displays the result on standard output (stdout). e.g.
$ sort /tmp/list_of_names # will sort the file into alphabetical order, and display it to the screen. Useful with option '-u'
to filter out duplicates.
uniq <filename>
- filters out all duplicate lines from a file or input stream (file or stream must be sorted!). Useful with option -c which
merely produces a count of unique lines.
ex <filename>
- ex is an old line editor, and almost never used now (similar to DOS edlin if you remember that - me, I've repressed
it). You are most likely to come across ex within the vi editor - all commands beginning with a colon (:) are ex
commands
ls -l
- lists files in a directory in long format. You cannot do without this. Here's a more detailed explanation. e.g.
$ ls -l
Part 1 Part 2 Part 3 Part 4 Part 5 Part 6 Part 7
-rw-rw-rw- 1 root staff 28 Jan 16 09:52 README
-rw------- 1 compjmd staff 4304 Jun 24 12:21 tabledict
drwxrwxrwx 2 compjmd staff 512 Jul 1 16:30 testdir
-rwxrwx--- 1 compjmd system 0 Jul 1 16:30 a.out
Part 1: Permissions - see chmod for explanation of these. If the first field is set, then the file in question is not
really a file at all, but something else, key:
-: normal file
d: directory
l: symbolic link created by 'ln'
c or b: device of some sort
You may sometimes see an 's' where the 'x' should be in the permissions - this is normally on executable files
which change other files. e.g. Permissions of 'sqlexec' the file that executes all informix queries should be '-rwsr-
sr-x' - this then accesses tables with permissions of '-rw-rw----'. where the table files are owned by informix
(group informix). the 's' flags allows changing of the database tables on a program level, but not on a unix level.
(can change contents via sqlexec but not use 'rm' command on db file).
Part 2: Number of links to this file (directories always have 2+).
Part 3: The owner of the file - e.g. If the owner is 'compjmd' and permissions are set to -rw------- then only the
user 'compjmd' may read or write to that file. Again, if owner is "compjmd" and permissions are -r-x------ then
…tripod.com/aix/handycommands.htm 9/19
4/15/2011 Unix Commands for AIX
only the user compjmd may read or execute that file. Only the owner of a file or root may chmod it.
Part 4: The group ownership of the file - (bloody hell, this is getting complicated). On a unix system there are
certain 'groups' which users can belong to, held in the file '/etc/group'. You will notice that in this file there will be
a main group, e.g. 'staff' which contains every user. Which means that any user listed under staff is in that
group.....right...every file has a group attached to it. Which means that if a file had permissions ----rw---- and a
group reference of 'system', then only users who were part of the group system could modify that file. To see
which groups the current user belongs to do id. Sorry if this wasn't comprehensible but you should never need
to use this anyway(!).
Part 5: Size of the file in bytes
Part 6: Time of last modification
Part 7: The name of the file
Useful options (and there are loads more). All may be combined except where specified:
vi <filename>
- love it or loathe it - the standard operating system text-file editor. See Related help file. Vi You can also use 'view'
which forces Read only (-R opt). vi +<number> enters the file at the specified line no. Also, vi +/<Search pattern> will
enter the file and move to the first occurrence of <Search pattern>. e.g.
$ vi +/"love it or loathe it" handycommands
Users new to vi hate it. I personally managed to get through University without using it ever (I used Joe's own editor
instead). If I accidentally went into vi, I had to ^Z and kill the job. Sigh. Five years of using vi means that I'm getting a
little better at it now... (I'm actually typing this now in a vi-clone for Windows).
ksh -o vi
- The Korn Shell - pros might notice that I don't mention using the C-Shell at all - I've never used it, so that's why it
doesn't appear. A Shell is a program that you run your commands in. Typing exit will end the current shell. The -o vi
…tripod.com/aix/handycommands.htm 10/19
4/15/2011 Unix Commands for AIX
option of the korn shell allows vi commands to work at the shell prompt after pressing escape. For example, pressing
escape and then 'k' will bring up the last command used in the shell.
awk
- this would be a damn useful command if I knew how to use it properly. see alternative page awkhelp
man <command>
- look at the manual, e.g.
$ man ps # will list the manual page for the command ps
smon
- monitor's system usage - F5 shows processes which are hogging the machine. Not available on AIX 4.1 and above
sadly.
uptime
- shows how long the system has been up and how hard it is being hammered. The load average fields show how
many jobs on average are waiting. <1 or less is very good, around 5 is pretty bad (though not unusual), >10 the
machine is being seriously hammered.
who
- list users who are currently logged on (useful with option 'am i' - i.e. 'who am i' or 'whoami')
w
- list users and what they are doing, including idle time. The first line is the output from uptime
id
- similar to whoami except that it does a direct check to see who you are - who only checks /etc/utmp so any su
commands will be ignored.
ps
- list processes currently running, by default on the current shell. Useful with options:
fuser -u <filename>
- show who is using a file.(system hogging command). Useful when trying to work out who has locked a row or table
in an informix database for example.
lpstat -p <printer>
- show the current status of a printer and any jobs in the queue. lpstat without arguments prints all of them.
enable <printer>
- enable a printer queue. You must be root or a member of the printq group to run this command.
disable <printer>
- disable a printer queue. You must be root or a member of the printq group to run this command.
…tripod.com/aix/handycommands.htm 11/19
4/15/2011 Unix Commands for AIX
enq <various parameters>
- examine spool queue for printers.
uname -a
- will show you what machine you're currently on.
ipcs
- list semaphores and shared memory.
ipcrm -s <semaphorenumber>
- remove semaphore or shared memory.
crontab
- use -l to list all regular scheduled jobs. To alter them, use option -e
at <now + ?? seconds/minutes/hours/days/years>
- perform a job at a specified time. (Useful for running something at a later date). at retains the current environment.
e.g.
$ at now + 5 minutes
echo "Phone Julie McNally" > /dev/tty616
^D
job compjmd.389748732 will be run at ???
Will echo to tty616 the message "Phone Julie McNally" in 5 minutes. e.g.2
$ at 0331235930
echo "April fools day!" > /dev/console
^D
will echo "April fools day!" to the console at 11:59 and 30 seconds, on the 31st of march. Format for this is:
[YYYY]MMDDhhmmss. at jobs are sometimes used in the place of crontab's because if the machine is off when the
crontab is meant to take place, the job never happens. at jobs automatically start when the machine is switched on if
the machine was down at the time. typing at -l will show you all the at jobs you have queued, at -r <atjob> will remove
an at job (only the owner or root is allowed to do this).
date
- show current date and time. This command may also be used to set the system clock (ONLY WHEN EVERYONE
IS LOGGED OFF) with a root user id. A date change is never simple, even when adjusting things by an hour. The
safest way to do it is to change the date then reboot the machine because otherwise the crontab daemon may start
doing jobs at odd times. I believe there might be a 'go slow/fast' option to set the clock, and the clock will then run
'slower/quicker' until it catches up with the required time.
last <username>
- shows a list of recent logins. It looks at /var/adm/wtmp so it only shows initial logins, and not whether those users
have been su'd to.
SYSTEM COMMANDS
…tripod.com/aix/handycommands.htm 12/19
4/15/2011 Unix Commands for AIX
/usr/include/sys/signal.h to see what signals you can send to a process.
smit
- system admin program for AIX
df
- list volume groups + usage. see also lsvg. Usually used with the -k flag so the number of blocks is displayed in 1024-
blocks.
cu -l <device>
- log on to device such as a pad or a modem. See related files /etc/uucp/* and /etc/locks and /etc/services
stty sane
- Changes terminal settings back to normal. If a tetra module for example crashes your screen so that no keys function
except ^C which doesn't even do very much then typing ^Jstty sane^J should cure the problem. To fully cure the
problem you also need to type stty tab3 (and stty -ixon if you're feeling a little overzealous)
stty
- allows you to change terminal settings such as the interrupt key, quit key, etc. e.g.
$ stty intr ^A # would change the interrupt key to being control-A
$ stty quit ^L #would set the quit key (normally ^\) to control-L. other key changes are:
To really annoy a systems administrator, change interrupt to 't' and quit to '^D' . hehehehehehe
lscfg
- show all connected devices
lsvg
- list volume groups (see related file diskhelp)
lspv
- list physical disks (and see related file diskhelp)
lspv without arguments will produce a list of all the hard-disks used. lspv <hard-disk-name> will produce a list of
information about the hard disk. lspv -l <hard-disk-name> will show any logical volumes which are mapped on to that
drive.
lsdev
- list devices. Options:
mkdev
…tripod.com/aix/handycommands.htm 13/19
4/15/2011 Unix Commands for AIX
- make devices. e.g. To make a tty:
# Script to add a tty. Options that need amending are:
# -l name of tty to be created - e.g '-l tty600' wil create
# a tty called 'tty600'
# -p RAN name
# -w Port number on RAN
# -a Attributes (e.g. to set up auto login, etc.)
mkdev -c tty -t 'tty' -s 'rs232' -l tty433 -p sa2 -w 2 -a term='wyse50' -a forcedcd='enable' -a login='enable' -a
speed='19200'
e.g. To create a printer (raw device):
mkdev -c printer -t 'osp' -s 'rs232' -p 'sa3' -w '10' -l label2 -a xon='yes' -a dtr='no' -a col=500
It is highly recommended that you make and change devices using smit
chdev
- change devices. See mkdev
cc
- c compiler, use with
shutdown
- shutdown the system so that it may be switched off. Rather obviously, this may only be run by root. Options:
-f shuts the system down immediately (rather than waiting for a minute)
-R reboot the system immediately after halt
oslevel
- show the current revision of the operating system.
CONNECTIVITY
exit
- end current shell process. If you log in, then type this command, it will return you to login. ^D (control-D) and logout
(in some shells) does the same.
rlogin
- login to a remote machine, e.g.
$ rlogin hollandrs # log in to machine called hollandrs
Useful with -l option to specify username - e.g.
$ rlogin cityrs -l ismsdev # log in to machine cityrs as user ismsdev For further info about trust network see .rhosts file
and /etc/resolv.conf (I think).
telnet
- very similar to rlogin except that it is more flexible (just type telnet with no arguments and then '?' to see the options).
Useful because you can specify a telnet to a different port.
ftp
- File Transfer Protocol - a quick and easy method for transferring files between machines. The .netrc file in your
$HOME directory holds initial commands. type ftp without arguments and then '?' to see options)
…tripod.com/aix/handycommands.htm 14/19
4/15/2011 Unix Commands for AIX
rcp
- Remote copy. Copies a file from one unix box to another, as long as they trust each other (see .rhosts file or
/etc/resolv.conf I think). Options
su - <loginname>
- switch user, option '-' means that the users .profile is run, without option you merely assume the id and permissions of
the user, without (for example) changing PATH and DBPATH, e.g.
$ su - root # become root
$ su root # gain permissions of root but don't change the current environment variables
$ su - vlink # switch to user vlink
If you are root, you may su to any other user without being prompted for a password. su without arguments is the
same as 'su root'. Note that the 'su' option is not available on all UNIX machines as it can crash some of them.
ping <hostname>
- check that <hostname> is alive and well (do not expect an immediate response from a machine that is linked over an
ISDN line). Firewalls often block ping packets after the Ping of Death so quite often you'll find you can't ping internet
sites either. Options include:
-q ping quietly
-i<no> wait no of seconds between each packet sending. The default is 1 second. If you are using ping to keep
an ISDN line up then using something like $ ping -i 5 -q hollandrs is ideal.
-f Never use this! Sends as many packets as it possibly can as fast as possible, used for network debugging and
is likely to slow networks horribly when used. Known as 'flood' pinging.
-c <no> send no of packets before giving up
To check that your machine can ping, try pinging 127.0.0.1 - this acts as a feedback loop, checking the network
card's ability to ping.
…tripod.com/aix/handycommands.htm 15/19
4/15/2011 Unix Commands for AIX
conv - ??
cpio
stands for copy in-out, and is extremely powerful if you can cope with the innumerable flags that you have to use(!)
$ cpio -iBcvumd "etc/hosts" </dev/rmt0 # Grab /etc/hosts file from tape
$ find /etc -print | cpio -oBcv >/dev/rmt0 # Write the contents of the /etc directory to tape
$ find /etc -print | cpio -pdumv /usr2/etcbackup/ # copy directory /etc to /usr2/etcbackup and retain all permissions.
meaning of the flags:
i - input
o - output
B - Block size of 5120 bytes
c - read/write header info
v - list file names
u - unconditional copy - overwrites existing file.
m - keep modification dates
d - creates directories as needed.
t - generate listing of what is on the tape.
p - preserve permissions.
dosdir <directory>
- show list of files on a dos floppy disk. Useful with option -l (long format). Like dos command 'dir'
dosformat
- format dos floppy disk (High Density)
tar
- Read/Write stuff to archive.
tar cvf /dev/rmt0 <filenames> # will write files to tape
tar xvf /dev/rmt0 will read files from tape
tar tvf /dev/rmt0 will give a listing of what's on the tape. If you're using an archive file then replace /dev/rmt0 in the
examples above with the name of the archive file.
…tripod.com/aix/handycommands.htm 16/19
4/15/2011 Unix Commands for AIX
SCREEN COMMUNICATION
echo
- a command mainly used in shell scripts. Examples:
$ echo "Hello" # will print Hello on your screen
$ echo "Hello" > /dev/tty616 # will print Hello on someone elses screen (warning - can crash their screen!)
$ echo $DESTF10 # will print the value of the environment variable DESTF10
$ echo "\033Fdemo demo" # will echo demo to the status bar at the top of a wyse terminal
See also file shellscripts
read
- will read text from standard input and place it in the variable name specified. See file shellscripts
line
- waits until the user presses return before carrying on (writes what is typed to standard output). If used in a crontab/at
job this instruction is ignored. See file shellscripts
talk <user>
- set up an interactive communication dialogue box between two users. Looks good but isn't really that useful.
write <user>
- writes a message to someone elses screen. Try typing 'write root' and then type a message, finishing with control-D.
banner <message>
- writes <message> in huge letters across your screen! (max: 10 chars per word)
wall <message>
- send a message to all people on a system. Can only be executed by root (I think).
tput <argument>
- tty type independent attribute setting (requires TERM variable and TERMCAP to be set). I only know these few
bits:
SCCS Overview
The source code control system allows versions of a program to be stored in a special file, so that any version may be
retrieved. There are a few commands involved (not all of them listed here). All source code files start with 's.'
…tripod.com/aix/handycommands.htm 17/19
4/15/2011 Unix Commands for AIX
$ get $SCUK/s.parser.c # extracts file parser.c from source code file $SCUK/s.parser.c as read only. See get -e for
editing.
MISCELLANEOUS
yes <word>
- yes outputs the word 'yes' as fast as its' little legs can go. Never called on it's own. Always used in pipes. For
example:
$ yes | rm *.o # would confirm 'yes' whenever rm prompts for confirmation. You can also use it to output a different
word e.g.
$ yes please # would output 'please' to the screen until you kill it (prob. immediately).
Are all held on a separate page now. Commands covered are export,if,for, shift, test, while, case, and a few others.
sed '<pattern>'
- used by myself for quick substitutions when tr doesn't seem to be doing its job properly. The syntax of the pattern is
similar to vi ex command line. E.g. To substitute all spaces with colon symbols the command is
sed 's/ /:/g' file1 # substitute all occurrences of spaces with colons in file1 and output to stdout.
…tripod.com/aix/handycommands.htm 18/19
4/15/2011 Unix Commands for AIX
…tripod.com/aix/handycommands.htm 19/19