UNIX Commands

web

 
  Commands for the UNIX operating system are case sensitive. UNIX commands are typically lower case. There can be up to three parts for each command i.e. command [options] arguments. Below are some common UNIX commands with descriptions and examples.

UNIX
Command
Description
of UNIX Command
Example
of UNIX Command
web
File Commands
cat Concatenates a file. cat filename
web
cp Copy a file. cp oldfilename newfilename
web
chgrp Change root of directory or file. chgrp root filename
web
chown Change ownership of director or file. chown admin filename
web
chmod Set permissions on directory or file. chmod 755 filename
web
date Displays current day, date and time. date
web
diff Displays the difference between two text files. diff filename1 filename2
web
file Display file type. file filename
web
less Displays the file with minimal space. less filename
web
mail Read and send email messages. mail
web
more Displays the contents of a file with page breaks. more filename
web
mv Rename a file or directory or move a file to another directory. mv oldfilename newfilename
mv /etc/filename /usr/filename
web
pico A basic text editor. pico
pico filename
web
pine Read and send email messages. Has more features than mail. pine
web
ps Reports the status of the currently running processes. ps
ps options
web
pwd Displays current directory path. pwd
web
quota -v Displays current disk usage and limits. quota -v
web
rm Remove (delete) a file. rm filename
web
sort Sort the lines of a text file alphabetically. sort filename
web
vi Text editor. vi
vi filename
web
w Indicates who is currently logged in with more information than "who." w
web
wc Counts the number of lines wc filenames
web
who Indicates who is currently logged in. who
web
./ Execute a program from the command line. ./filename
web
* Wildcard. rm abc*.pl
(This will delete all files starting with abc and ending with .pl)
web

   
Directory Commands
pwd Displays current directory path. pwd
web
echo $cwd Displays the logical path or directory. echo $cwd
web
cd Change directory. cd /usr/
web
cd .. Go back one directory level. cd ..
web
ls Lists the contents of the current directory. ls -a
web
mkdir Make a directory. mkdir directory-name
web
rmdir Remove a directory. rmdir directory-name
web

   
General Commands
passwd Allows you to change your password. passwd
web
logout Ends your current session. logout
web
ps Displays current processes. ps
web
clear Clears the terminal screen. clear
web
quota -v Display disk usage. quota -v
web
gzip Compresses a file. gzip filename
web
gunzip Uncompresses a file. gunzip filename
web

   
Help Commands
apropos Commands for a specific topic. apropos mail
web
help A list of online help topics or help on a specific topic. help
help mail
web
man A list of manuals or a manual on a specific command. man
man mail
web
whatis A description of a specific command. whatis mail
web

   
Print Commands
lpr Prints a postscript file. lpr filename
web
enscript Prints text files to a postscript printer. enscript -Pprintername filename
web
printers Displays a list of printers and locations. printers
web
lpq Prints the current print queue. lpq -Pprintername
web
lprm Removes a print job from queue. lprm -Pprintername queuenumber
   
 
web

ReaLife WebDesigns / 310.371.3275
We appreciate having the opportunity to contribute to the success of your business!

© 1999-2010 ReaLife WebDesigns. All rights reserved. site map | terms of use