Unix Commands
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 a directory add 
 
to find files by contents
grep contentstofind *
to remove a non-empty directory rm -r (directory)
show length of file in lines: wc -l file
to show the contents of a file use cat
- 
or
head -count fileortail -count file - 
to copy file contents to MacOs X Clip Board:
cat file | pbcopy 
to print matching lines from a file: grep -F "Aii" events.log
uncompressing:
- 
use
gunzipon a .tgz file - 
tar xvf (filename)for a .tar file 
processes
- 
ps -Ato see everything - 
ps -C javato see subset - 
kill pidto kill process with numberpid - 
ps auxwwto see lots of detail on specific apps running 
disk utilization:
- 
df -hwill 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 hitctl-a dto detach 
make
- 
makecompiles (after fetching necessary pieces) - 
make install(aftermake) installs (or instead ofmakecompiles, then installs)- can 
make, then tweak a file, then go straight tomake install 
 - can 
 - 
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
 
Edited: | Tweet this! | Search Twitter for discussion

 Made with flux.garden