Tuesday, March 3, 2009

Linux ref

1. To remove whole directory --> rm -rf (directoryname)
2. Check the different between files --> diff fileA fileB
3. sudo apt-get update
4. sudo apt-get upgrade
5. du -s // to know the size of folder
6. du -sh // the size of folder
7. df // the memory being used
8. tar zcvf * // copy all the files in the folder into tarfile
9. tar zcvf cinta // copy all files in folder cinta into tarfile
10. cat fileA fileB > fileC // copy file A and file B intttto file C
11. grep "aku" - r // searching for the word aku recursively
12. ls -l | wc -l // display the number of files in a directory
13. ls -n // list and sort by name all the files in the directory
14. ls | sort -n //display all the files and sort by number
15. ls | sort -n > mija.txt // put the result in mija.txt
16. man sort // get list of sort utility


Useful links
Linux command : ls
http://linux.about.com/od/commands/l/blcmdl1_ls.htm