OSXFAQ Mac OS X UNIX Tip-of-the-Day

Week 103 - Unix Commands Reference III (4 April 2005)
by
Adrian Mayo - Editor, OSXFAQ
Wednesday - Commands for Running Processes
kill ... stop/restart processes by PID
Sends a signal to a process. Give the signal number or name, and the PID (Process ID) of the process to kill.
man 2 sigaction ... information on signals
Use this command to learn about the possible signals that 'kill' can send to running processes.
killall ... stop/restart processes by name
Like kill but a case sensitive process name is required instead of a PID.
(See tips week 45)
ps ... list running processes
Option -x to also list processes not attached to the terminal
Option -a to list processes belonging to other users
Option -ww to make a wide listing, otherwise the output is truncated
Option -c to list only the process (command) name, not the full command line
top ... display information on running processes
(See tips week 19)
nice ... execute a process with a given priority
renice ... alter the pripority of an existing process
exec ... execute a command in place of shell
(See tips week 47)
nohup ... execute a command immune to hangups
The command will not be stopped by 'kill -HUP' or when the current shell exits
(See tips week 78)
leaks ... check process for memory leaks
For example 'leaks TextEdit'
heap ... list allocated memory in process's heap
For example 'heap TextEdit'
printenv ... display environment of the current shell
If you want to learn more about Mac OS X Unix visit the Learning Center
click.
- For beginners: Mac OS X Unix Tutorials
- For detailed information on specific topics: Advanced Unix
- For OS X in gereral: Mac OS X Tutorials
|