| WebSeitz/wikilog |
| Unix Commands |
|
| last edited by BillSeitz on Sep 1, 2008 7:33 am |
how to use UNIX variants
doing su (change to super user) is often helpful
If having to copy files over to server, sometimes need more access, so chown (regular id) (directory)
to give a long directory listing sorted by moddate: ls -l --sort=t
to find a file by name, start from the directory to start searching
find . -name "thread*"
to find a directory add -type "d"
to find files by contents
grep contentstofind *
to remove a non-empty directory rm -r (directory)
show length of file: wc -l file
to show the contents of a file use cat
or head -count file or tail -count file
to print matching lines from a file: grep -F "Aii" events.log
uncompressing:
use gunzip on a .tgz file
tar xvf (filename) for a .tar file
processes
ps -A to see everything
ps -C java to see subset
kill pid to kill process with number pid
ps auxww to see lots of detail on specific apps running
disk utilization:
df -h will tell you the basic availability on the machine
"find -printf %s %p\n | sort -nr | head" - will tell you the 10 biggest space consumers
run things in a detached screen (which, among other things, keeps them running after you disconnect)
one variation: screen -dmS sessionName commands, then, to access its console while running: screen -r sessionName
or just screen -S sessionName, then type commands as usual, then when ready hit ctl-a d to detach
make
make compiles (after fetching necessary pieces)
make install (after make) installs (or instead of make compiles, then installs)
can make, then tweak a file, then go straight to make install
http://www.zettai.net/Members/george/python213FreeBSDPlone.blog/view
http://mail.gnu.org/archive/html/gnustep-dev/2002-12/msg00032.html
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html
| See Back Links: JPEG | Zwiki Freebsd Stability Problems | |
| User Options Recent Changes Help Page |