AIX 5L Basics (Unit 05) – Using Files

cp
rm -i – interactive mode (y/n)
mv -i – interactive mode (y/n)
rm -R – remove recursively below
pwd – print working directory
mkdir – create a directory
rmdir – remove a directory

/etc/motd
/etc/passwd

Displaying Files:
————————-
cat filename – (ctrl-s) stop scrolling, (ctrl-q) continue scrolling
pg filename – (enter) next page, (-) previous page, (ctrl-c) quit
more filename – (space) next page, (enter) next line, (b) previous page, (/) search, (n) find next, (ctrl-c) quit, (q) quit

wc -word count (-c characters, -w words, -l lines)
who | wc -l – count number of users on the system

Linking Files:
——————–
Allows one file to have more than one name or alias. Both file names use the same inode.

Caution: Could edit both file names at the same time. The last to be saved overwrites the changes made to the other file name.

rm – removing one link or file name doesn’t remove the file until both names are removed

ln source_file target_file

Print Files:
——————
qprt – print a file
qchk – check status of the print queue
qcan -x job# – cancel a print job

lp
lpr
lpq
lpstat (same as qchk -A – looks at all queues)
cancel job#

Leave a Reply

Your email address will not be published. Required fields are marked *

*