| Nov 20 |
Very Useful Linux/Unix CommandsWorking on a *nix system is no piece of cake. Especially when you are used to Graphic interface of ‘windows’. The world where mouse is the king. Here is a list of most used / most discussed / most important *nix commands. Mastering this will surely get your confidence level high in the black background and white characters’ world !! My experience says that for starters in UNiX / LiNuX , these commands are enough to get you in smoothly ! clear usage: [root@test~]$ clear ls usage: [root@test~]$ ls usage: [root@test~]$ ls -l cat usage: [root@test~]$ cat filename.extension usage: [root@test~]$ rm filename.extension usage: [root@test~]$ rm -i filename.extension [prompts for confirmation before removing a file] usage: [root@test~]$ rm -f filename.extension [force removal of the file regardless of it bieng write-protected or open] usage: [root@test~]$ rm -r directory [remove files recursively in 'directory'] usage: [root@test~]$ cp file1.ext file2.ext usage: [root@test~]$ cp file1.ext /some/other/location/file2.ext usage: [root@test~]$ cp file1.ext user@some.other.server:~/some/other/location/file2.ext usage: [root@test~]$ passwd usage: [root@test~]$ passwd SomeNewUser [root access only] usage: [root@test~]$ motd finger usage: [root@test~]$ finger -p Login Name Tty Idle Login Time Office Office Phone xuser pts/0 Oct 22 22:04 (ool-4578671d.dyn.optonline.net) startx usage: [root@test~]$ startx -dpi 300 -depth 32 less usage: [root@test~]$ less filename.ext usage: [root@test~]$ less +G filename.ext [start from end] info usage: [root@test~]$ info usage: [root@test~]$ info less usage: [root@test~]$ lpr filename.ext usage: [root@test~]$ lpr -# 3 filename.ext [3 copies] grep usage: [root@test~]$ grep "needle" haystack.ext usage: [root@test~]$ grep -i "neEdlE" haystack.ext usage: [root@test~]$ grep -i -r "neEdlE" directory/ head usage: [root@test~]$ head filename.ext tail usage: [root@test~]$ tail filename.log usage: [root@test~]$ tail -f filename.log [don't exit // realtime] usage: [root@test~]$ mv filename.ext /some/other/directory/ usage: [root@test~]$ mv filename.ext newname.ext [rename] file usage: [root@test~]$ file program.php program.php: PHP script text usage: [root@test~]$ file archive.tar.gz archive.tar.gz: gzip compressed data, from Unix echo usage: [root@test~]$ echo Hello Think-Lamp usage: [root@test~]$ echo * | wc date usage: [root@test~]$ date usage: [root@test~]$ date -R usage: [root@test~]$ cal usage: [root@test~]$ cal -y 2009 usage: [root@test~]$ gzip filename.etx > archive.gz usage: [root@test~]$ gzip -f -q filename.etx > archive.gz[force and supress errors] usage: [root@test~]$ gzip -f -q -r directory/ > archive.gz gunzip usage: [root@test~]$ gunzip archive.gz which usage: [root@test~]$ which echo usage: [root@test~]$ which less whereis usage: [root@test~]$ whereis echo usage: [root@test~]$ whereis less who usage: [root@test~]$ who usage: [root@test~]$ who -b w usage: [root@test~]$ w mesg usage: [root@test~]$ mesg write usage: [root@test~]$ write xuser hello! This is test message usage: [xuser@test~]$ Message from [root@test~]$ on pts/1 at 13:25 ... hello! This is test message talk usage: [root@test~]$ talk xuser@test usage: [xuser@test~]$ Message from root@test talk: connection requested by root@test. talk: respond with: talk xuser@test chmod usage: [root@test~]$ chmod 775 file.ext usage: [root@test~]$ chmod -r 777 directory/ CHMOD can also to attributed by using Numeric Permissions: 400 read by owner 040 read by group 004 read by anybody (other) 200 write by owner 020 write by group 002 write by anybody 100 execute by owner 010 execute by group 001 execute by anybody ____ 777 read/write/execute by everybody ! usage: [root@test~]$ mkdir newdirectory rmdir usage: [root@test~]$ rmdir newdirectory ln usage: (hard link) [root@test~]$ ln targetfile.ext linkname.ext usage: (soft link) [root@test~]$ ln -s targetfile.ext linkname.ext df usage: [root@test~]$ df usage: [root@test~]$ df -h top usage: [root@test~] top # Once in TOP screen, use shift+F to select 'sort by' field. # Once in Top screen, use Shift+R to 'sort' ascending OR descending tty usage: [root@test~] tty kill usage: [root@test~] kill -p 2345 jobs usage: [root@test~] jobs usage: [root@test~] jobs -l netstat usage: [root@test~] netstat -a -e 5 Responses to “Very Useful Linux/Unix Commands”Leave a Reply |
Hi this page is not working properly in Google Chrome and Fire Fox
Please check it
it works fine in Chrome
He’s using Linux so he’s using Gecko or Webkit browser at most
anyway it’s working fine from FF
“… this page is not working properly..”
Seriously? That’s all you can say to help? Why not tell them exactly what’s “not working properly”?
thanks a lot,now its easy 2 work on linux