What is wc ?
3 wc examples
Syntax and Options
Related Commands

What is wc ?

wc prints the number of lines, words and bytes in the given input. wc is the abbreviation of word count.
[continue reading…]

What is whereis ?
3 whereis examples
Syntax and Options
Related Commands

What is whereis ?

Whereis command is used to find out where the binary, source, and man page files for a command is located.
[continue reading…]

What is pmap ?
3 pmap examples
Syntax and Options
Related Commands

What is pmap ?

pmap displays the memory map of a process for the specified pid(s).
[continue reading…]

What is eject ?
4 eject examples
Syntax and Options
Related Commands

What is eject ?

eject command is mainly used to eject the CD / DVD tray. You can also close the tray using certain options.

eject command can be used to eject floppy disk, tape, or JAZ or ZIP disk. eject command can also be used to control the eject options.

If the device is mounted while trying to eject, it will be unmounted first before ejecting.
[continue reading…]

What is iostat?
4 iostat examples
Syntax and Options
Related Commands

What is iostat?

Iostat command reports CPU and I/O statistics. iostat command is used during performance analysis to narrow down the problematic areas in the system.

Sample output of iostat command and its explanation:

$ iostat
Linux 2.6.31-17-generic (sathiya-laptop) 	05/25/10 	_i686_	(1 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          25.99    0.78    7.43   12.77    0.00   53.03

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
sda              27.40       797.19       201.27     800902     202208
sr0               0.03         1.24         0.00       1248          0

The first line displays general information — Linux kernel version, hostname etc.,

Next two lines displays CPU statistics, in which the first 3 column displays average CPU usage. The 4th column displays the percentage of time the CPU were idle and waited for I/O response. 5th column displays percentage of waiting time of virtual CPU. 6th column displays the percentage of time the CPU is idle.

Remaining line displays the device utilization report. First line in that is headers, such as number of Transfer per second, number of blocks read per second, blocks write per second, total block reads, total block writes.
[continue reading…]

What is shutdown?
5 shutdown examples
Syntax and Options
Related Commands

What is shutdown?

Shutdown the system in a safe way. You can shutdown the machine immediately, or schedule a shutdown using 24 hour format.

After bringing down the system, shutdown command halts or reboots the system according to the option that is specified. Only root user can execute shutdown command.
[continue reading…]

What is md5sum?
5 md5sum examples
Syntax and Options
Related Commands

What is md5sum?

md5sum is a 128 bit checksum which will be unique for the same data provided. Use md5sum command to calculate and cross check the md5sum.

Two non identical files will never have the same md5sum. Typically, md5sum is used to cross verify the integrity of a file after downloading it from a website.
[continue reading…]

What is chmod?
3 chmod examples
Syntax and Options
Related Commands

What is chmod?

chmod stands for change mode, which changes the file or directory mode bits. To put it simply, use chmod command to change the file or directory permissions.

Following is a sample of ls -l command output. In this, the 9 characters from 2nd to 10th position represents the permissions for the 3 types of users.

-rw-r--r--  1 john john  272 Mar 17 08:22 test.txt

In the above example:

  • User (john) has read and write permission
  • Group has read permission
  • Others have read permission

Three file permissions:

  • read: permitted to read the contents of file.
  • write: permitted to write to the file.
  • execute: permitted to execute the file as a program/script.

Three directory permissions:

  • read: permitted to read the contents of directory ( view files and sub-directories in that directory ).
  • write: permitted to write in to the directory. ( create files and sub-directories in that directory )
  • execute: permitted to enter into that directory.

Numeric values for the read, write and execute permissions:

  • read 4
  • write 2
  • execute 1

To have combination of permissions, add required numbers. For example, for read and write permission, it is 4+2 = 6.
[continue reading…]

What is umount?
3 umount examples
Syntax and Options
Related Commands

What is umount?

umount stands for unmount, which unmounts the file system. Use umount to unmount a device / partition by specifying the directory where it has been mounted.

Following is the partial output of the mount command.

# mount
/dev/sdb1 on /mnt type vfat (rw)

Device /dev/sdb1 is mounted on /mnt, from where all your process will be accessing the data available on that device.

For some reason, if you like to physically detach the /dev/sdb1 device, you should first unmount it (to logically detach the device).
[continue reading…]

What is exportfs?
3 exportfs examples
Syntax and Options
Related Commands

What is exportfs?

exportfs stands for export file system, which exports file system to a remote server which can mount, and access it like a local file system.

You can also unexport the directories using exportfs command.
[continue reading…]