I have posted 10 basic linux commands part1 in my previous article and here is a follow up for the article. The second part of this tutorial will have 10 more commands that you beginners should learn. Please check out my previous article before you proceed further. Please note that these set of commands start from 11 and ends with 20.
11: crontab – crontab is used to create automatic jobs. This can be used to run some scripts at paticular period of time
like every day, every hour or every minute if you want.
The above command edits crontab entries.
The above command displays the crontab entires currently available
12: date – date displays current date on the terminal.
Wed Jan 12 01:02:20 IST 2011
13: diff – This command differentiates one file to another based on line by line comparision.
backup example note sample save test
linux@india365:~/work$ diff sample test
< This is a sample --- > vamsi
14: dmesg – dmesg displays the kernal messages during on every system reboot.
dmesg | tail
dmesg | less
15: du – This command displays the size of files that are in a specifed directory.
linux@india365:~/work$ du -h
16: echo – Echo prints the message displayed on to the terminal.
linux@india365:~/work$ echo hello there
17: fdisk – fdisk shows the number of hard disks and partions availble in the system. It is also used to create, delete partions.
linux@india365:~/work$ sudo fdisk -l
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000b808f
Device Boot Start End Blocks Id System
/dev/sda1 * 1 369 2963961 83 Linux
/dev/sda2 370 1305 7518420 5 Extended
/dev/sda5 370 418 393561 82 Linux swap / Solaris
/dev/sda6 419 1305 7124796 83 Linux
18: find – Find command find the searches the files and direcories you are looking for.
find -iname findme -type f (This command searches for a fine named “findme” from the current directory and subdirectories)
linux@india365:~/work$ find -iname findme -type f
19: free – Free shows the empty memory available in the machine.
total used free shared buffers cached
Mem: 1036092 335256 700836 0 42060 127220
-/+ buffers/cache: 165976 870116
Swap: 393552 0 393552
20: grep – grep searches for patters of text from a given file or files in a given directory and subdirectories.
linux@india365:~/work$ grep -R vamsi *
If you like this article, then please consider sharing it. Sharing really inspires us to do things much better!!