next up previous contents
Next: Disk Storage and Usage Up: A Useful Subset of Previous: Backing up and Restoring

Shell Processes

ps
[flags]
Reports process status.
  1. To list the processes you have started:
    ps
  2. To list the processes you have started in more detail:
    ps -fu $LOGNAME
  3. To list all process information available:
    ps -efl

who
[flags] [file]
Identifies the users currently logged in.
  1. To display information about who is using the system:
    who
  2. To display your user name and the workstation you are logged in on:
    who am i

at, batch
[flags]
at runs jobs at a later time and batch runs jobs when the system load level permits. Need to be a system user or a superuser or have permission to use these commands.
  1. To run a set of commands in sequence at a certain time:
    at 5 pm Friday
    command1
    tex2html_wrap_inline855
    commandn
    Ctrl-D
  2. To run a set of commands in sequence when system load permits:
    batch
    command1
    tex2html_wrap_inline855
    commandn
    Ctrl-D
  3. To list the jobs you have sent to be run later:
    at -l
  4. To cancel jobs with job number 103 and 227:
    at -r 103 227

nohup
[command] &
Runs a command without hangups and quits as a background process. Note that you can use this command to start a job to be running after you log off. However, you must wait for a second or two before logging off (check your job with a ps command first) because the nohup command takes a moment to start the command you specified. Otherwise your command may not run at all, since logging off kills your parent process and all your normal child processes.
  1. To leave a command running after you log out of the system:
    nohup find / -print &

kill
[flags] [process-ID (PID)]
Sends a (kill) signal to a running process.
  1. To stop a given process with PID 1095 (uses signal 15 (SIGTERM) by default):
    kill 1095
  2. To stop a given process with PID 1095 which ignores the default kill signal (use signal 9 (SIGKILL)):
    kill -9 1095
  3. To stop all of your background processes:
    kill 0
  4. To stop all processes that you own:
    kill -9 1
  5. To stop all of your processes and log yourself out:
    kill -9 0

killall
[flags]
Cancels all processes that you have started except the calling process.
  1. To stop all background processes that have started (uses signal 9 (SIGKILL)):
    killall
  2. To stop all background processes that have started giving them a chance to clean up (uses signal 15 (SIGTERM), waits 30 seconds and then signal 9 (SIGKILL)):
    killall -

next up previous contents
Next: Disk Storage and Usage Up: A Useful Subset of Previous: Backing up and Restoring

Harry Schranz
Tue May 13 18:57:01 EST 1997