Helpful, advanced UNIX commands. Some
may require root or superuser permission. Other tutorials:
http://www.nmt.edu/tcc/help/unix/unix_cmd.html
http://www.indiana.edu/~uitspubs/b017/
ctrl-s, ctrl-q |
ctrl-s freezes the screen, ctrl-q unfreezes
it. Useful to stop output without stopping program |
at |
Do job at certain time |
cron |
Execute script at certain intervals (daily,
weekly, etc.). |
du -k -s directory |
Get directory size |
find rootdir -name filename |
Look for filename starting with rootdir. |
gzip |
zip/unzip |
hexedit filename |
Edit a file in hex (access raw binary,
not ASCII text) |
kill-9 pid |
Kill any process. Signal 9 can't be ignored. |
ln -s old new |
Symbolic link to directory. |
netstat |
Prints open connections, ports, etc. |
od -x file |
Octal dump (print file in octal). -x
is hex flag. |
ps |
List processes currently running. try
"ps -u username" |
reboot |
Can reboot machine remotely. Do "find / -name
reboot"
|
shutdown now |
Shuts down a *nix box |
su |
Get superuser priveledges, without logging
in as root. |
talk name@host |
Chat with another user |
tar |
Compress/extract files.
compress:tar cvf myfile.tar files
extract: tar xvf myfile.tar
|
tcpdump |
Print packets received by host. Try -Nt
for succint output. |
time operation |
Times how long an operation takes (time
a.out) |
traceroute dest |
Print hops from current host
to dest (an ip addr or web page). |
w or finger |
List users currently logged on. |
Other operations:
- Log off an idle user
- su (get root permission)
- w (find the users)
- ps -u username (get his processes and their pid)
- kill -9 pid (kill his processes, including his logon shell)
|