Useful UNIX Commands

Useful UNIX Commands
The following is a list of some of the more important and useful commands in Unix (specific to HPUX) Remember that the man command can be used to find out the specific usage of any of these.

Essentials

  • logout - use this command when you are done, always
  • man - use the command `man command' to learn about a command.

Files and Directories

  • cd - change directory
  • pwd - print working directory (the directory you are in)
  • rmdir - remove directory (the directory must be empty)
  • mkdir - make a new directory
  • rm - remove a file or directory
  • ls - list files
  • cp - copy a file
  • mv - move a file (destroys original)
  • less - view a text file
  • cat - prints the contents of a file on the screen
  • touch - create an empty file
  • gzip and gunzip - compression and decompression
  • tar - Tape Archive. Now used to store directory trees as a single file for easy transfer. See the -xvf and -cvf options in the man page
  • uudecode and uuencode decode and encode binary files as text files for transfers

System Status

  • date - displays the current date and time
  • du - displays amount of disk space in 512byte blocks ('du -s' gives the summary for a directory)
  • quota -v - displays disk limits and amount currently in use
  • ps - display running processes ('ps -ef | grep username' gives all the processes owned by a particular user)
  • who - display who is on the machine and where they are connected from
  • w - display who is on and what they are doing
  • who - display who is on and where they are on from
  • jobs - display the jobs you own
  • uptime - display time, number of users, and load averages
  • loads - a local script to show the loads on all the HP700s
  • renice - alters priority of a running process. You should renice long simulations so you don't hog processor cycles.

Networking

  • ssh - open an encrypted connection with a host
  • telnet - open a remote session with host
  • rlogin - open a remote session with host
  • ftp - File Transfer Protocol: send and receive files betweem machines
  • ping - check to make sure a remote machine is reachable
  • finger - show information about a person on a system or whoever is on the remote system WWW version

Editors and Text Processors

  • vi - Visual Editor. Great stuff
  • pico - Easy to use editor
  • grep - searches a file for a pattern
  • a2ps - (not currently availible) allows the formatting of text into a multi-columned format

Printing

Please see the printing one-pager for details about printing.

  • lp - print the specified file. Common usage: 'lp -dhpps file.ps'
  • lpstat - tells you infomation about current print jobs
  • cancel - cancel a print job. Common usage: 'cancel hpps-###'

That should be a good start on the commands that you need. Take a look at the software available on the 700s as well. Remember, if you don't know, ask questions. Most people here in ECE are willing to help other people.