10 More Basic Linux Commands For Beginners With Examples – Part2

By | January 11, 2011

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.

crontab -e
The above command edits crontab entries.
crontab -l
The above command displays the crontab entires currently available

12: date – date displays current date on the terminal.

linux@india365:~/work$ date
Wed Jan 12 01:02:20 IST 2011

13: diff – This command differentiates one file to another based on line by line comparision.

linux@india365:~/work$ ls
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
4 ./backup
4 ./save
28 .
linux@india365:~/work$ du -h
4.0K ./backup
4.0K ./save
28K .

16: echo – Echo prints the message displayed on to the terminal.

linux@india365:~/work$ echo hello there
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.

linux@india365:~/work$ free
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!!

3 thoughts on “10 More Basic Linux Commands For Beginners With Examples – Part2

  1. Pingback: 10 Basic Linux Commands For Beginners With Examples - Part1 | Linux Tutorials

  2. Pingback: 10 Basic Linux Commands That Work On Debian Lenny PART3 | Linux Tutorials

  3. Kalanidhi

    All the commands given in two pages are good and very nice.But can we get new commands in the pages please like nroff,csplit, and specially logrogate. I haven’t written many new commands.Please weite about them or please mail me about their details.I think i haven’t written some or many new commands.Please give us some more details.Please………


Leave a Reply

Your email address will not be published. Required fields are marked *