
5

linu下如何让mount显示的很整齐
source link: https://bajie.dev/posts/20240119-mount_beauty/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Linu下如何让mount显示的很整齐
2024-01-19
1 分钟阅读
如果单独执行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这个命令,可以对输出进行对齐操作!!!
</div
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK