Linux Basic Commands:- 1)pwd -Show what directory you are in 2)cd -Changes directory 3)cd .. -Move up one directory 4)cd ~ -Take you back to your home directory 5)mkdir-Make directory 6)rmdir-Remove directory 7)ls-list files 8)mv-Move file from one directory to another 9)cp- copy file with *.bak 10)tat cvf *.tar dirname/ c->Create a new archive v->files which are processed f->following is the archive filename Above cvf option does not provide any compression 11)zip compression by using z option "tar cvzf *.tar.gz dirname/" 12)unzip the file name by "unzip filename" 13)Extract the zipfile by "tar -xzvf *.gz" 14)df-Disk free -->df -H -Show the no of occupied blocks in GB,MB 15)free -Displays information about RAM and swap space 16)Create file with "touch filename.*" 17)Remove file "rm -f filename.*" 18)Remove folder "rm -rf filename.*" 19)To set date “date MMDDHHmmYYY” 20)To set date and time on server by date -s "19 APR 2012 11:14:00” 21)Check your disk usage in linux with “du -h” 22)Clear Cache Memory in Linux server:-
Type “crontab -e”(press i to insert)
Type 0**** /root/clearcache.sh
Create a file in /root called clearcache.sh with the following content