You may occasionally want to check whether a process running in the background is still underway, or to shut down a resource-hogging program without waiting for it to finish. Here are the necessary commands:
Command | Action | Comments |
---|---|---|
ps -a | provides a list of current processes | -ef instead of -a gives more detail |
top -i # | lists running processes, and % of cpu usage by each, updating the list every # seconds | press 'q' to end the display |
kill [PID] | kills the process with the given process identification | only the sysop can kill processes not originating with him or her |
kill -HUP [PID] | causes the process specified to reread its configuration file, thus allowing it to be restarted with different parameters |
To check on available disk space:
Command | Action | Comments |
---|---|---|
df -k | displays list of directories, their size, and % of disk in use | the -k option causes display in Kbytes rather than blocks |
du -k [path] | provides a listing of the files in the directory specified by [path] and their sizes | use this regularly to check your disk usage |