mount beautifully !

This is small tweak to display the output of the mount command in a more aesthetic way.

Until now, many of you would be using the mount command in a way that requires you to stretch your eyes to look at what exactly you want.

Instead you can use the pipe to pass the output of this command to another command : coulumn along with the usage of the ‘-t’ flag.

Below you can see the examples with and without the usage of : mount


Now lets have a look at how this looks with : mount | column -t



You can also use this to read and display output from files. Lets see how the output of /etc/fstab looks with and without the usage of columnt -t.
  • Output of fstab file without using columnt -t:
# cat /etc/fstab | grep -v ^#
/dev/mapper/vg_dhcp209191-lv_root /     ext4    defaults        1 1
UUID=9b14ad8f-93d9-432e-bcb0-94f012607328 /boot    ext4    defaults        1 2
/dev/mapper/vg_dhcp209191-lv_swap swap    swap    defaults        0 0
tmpfs        /dev/shm     tmpfs   defaults        0 0
devpts        /dev/pts    devpts  gid=5,mode=620  0 0
sysfs        /sys    sysfs   defaults        0 0
proc      /proc  proc    defaults        0 0
  • Output of fstab file with columnt -t:
# cat /etc/fstab | column -t | grep -v ^#
/dev/mapper/vg_dhcp209191-lv_root                          /                  ext4            defaults                   1           1
UUID=9b14ad8f-93d9-432e-bcb0-94f012607328         /boot           ext4            defaults                  1           2
/dev/mapper/vg_dhcp209191-lv_swap                      swap             swap         defaults                   0           0
tmpfs                                                                                /dev/shm    tmpfs           defaults                  0           0
devpts                                                                             /dev/pts       devpts        gid=5,mode=620    0           0
sysfs                                                                               /sys                sysfs         defaults                    0           0
proc                                                                                 /proc               proc          defaults                    0           0
So now you can read your files and command outputs in a better way.

One Reply to “mount beautifully !”

Leave a Reply

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