如果单独执行mount命令,显示的会很错乱:

mount  
/dev/sda3 on / type ext4 (rw)
proc on /proc type proc (rw)  
sysfs on /sys type sysfs (rw)  
devpts on /dev/pts type devpts (rw,gid=5,mode=620)  
tmpfs on /dev/shm type tmpfs (rw)  
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)  
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)  
You have mail in /var/spool/mail/root  

乱作一团,那么怎么让这些整齐一些呢?

mount |column -t  
/dev/sda3  on  /                         type  ext4         (rw)
proc       on  /proc                     type  proc         (rw)  
sysfs      on  /sys                      type  sysfs        (rw)  
devpts     on  /dev/pts                  type  devpts       (rw,gid=5,mode=620)  
tmpfs      on  /dev/shm                  type  tmpfs        (rw)  
/dev/sda1  on  /boot                     type  ext4         (rw)
none       on  /proc/sys/fs/binfmt_misc  type  binfmt_misc  (rw)  
sunrpc     on  /var/lib/nfs/rpc_pipefs   type  rpc_pipefs   (rw)  

整齐多了,对吧。

记住column -t这个命令,可以对输出进行对齐操作!!!

comments powered by Disqus