CCL Home Page
Up Directory CCL unix.html
Most used UNIX commands

Most used UNIX commands

commands in bold
names of user supplied items in italics

cat file
-displays file without stopping
cd directory
-change to a subdirectory of the current directory
cd /path/directory
-change to a new directory
cd ..
-move up one directory
chmod +w dir
-changes permissions of directory to allow others to write into it.
cp file location
-Copies a file to a new location, where the location can be a directory or a new file name.
date
-shows the date and time
df -k
-shows the amount of room left on the hard drives
ftp machine
-transfer files between current computer and named machine.
Examples of named machine are asnc90 or asnc90.asc.edu or 129.66.16.2 User logs into the new machine then types
get file -to bring a file from the new machine or
put file -to send a file to the new machine or
dir -to show files on the new machine or
cd directory -to change to a new directory on the new machine.
kill -9 pid
-stops the job with the given pid number (get pid number with ps command)
lpq
-shows which jobs are pending in the print queue
lpr file
-sends the file to the default printer (usually a line printer)
lprm job#
-removes a job from the print queue (job number is gotten from the lpq command)
ls
-Lists files in the current directory
ls -a
-Lists files including hidden files
ls -l
-Lists files along with size, date, ownership and permissions
mail user
-sends mail to the specified user on that computer.
End the message by typing control-D
mail user@addr
-sends mail to a user on another computer.
End the message by typing control-D
man command
-shows manual page on how to use that command
mkdir directory
-creates a new directory
more file
-displays a file controlled by the commands:
return -show next line
space -show next screen
b -show previous screen
q -quit
mv file location
-If location is a file name, this renames the file.
-If location is a directory, this moves the file there.
passwd
-changes users password (for machines not using yellow pages)
otherwise use yppasswd
program
-typing the name of a program will run that program
program &
-runs the program in the background, so the user can continue to work while the program runs
ps
-shows processes belonging to the user for that session by pid number
ps -u user
-shows all processes belonging to the specified user by pid number
pwd
-shows current directory path
rlogin machine
-allows user to work in text mode on the named machine.
Examples of named machine are asnc90 or asnc90.asc.edu or 129.66.16.2
rm file
-deletes the file
rm *.ext
-deletes all files with that extension (be careful)
rm *
-deletes everything in that directory (be really careful)
Don't do this in your home directory ever, there are important hidden files!!
rmdir directory
-deletes the directory
talk user
-allows interactive typing of messages between to logged in users.
Second user must also type talk first_user
telnet machine
-Allows user to work in text mode on the named machine.
Examples of named machine are asnc90 or asnc90.asc.edu or 129.66.16.2
time program
-runs the program then tells the user how long the program took to complete
vi
-the UNIX ASCII text editor (requires a complete set of instructions of it's own)
who
-shows who is logged in
who am i
-shows your login ID
yppasswd
-changes users password (for machines using yellow pages)
otherwise use passwd
Return to table of contents.
Modified: Thu Jan 4 02:29:27 2001 GMT
Page accessed 12408 times since Thu Jan 4 18:55:47 2001 GMT