Linux ls以K、M、G为单位查看文件大小 图文教程

Linux中如何使用ls命令查看文件并以为大小KBMBGB单位查看文件大小

man ls

-h, –human-readable print sizes in human readable format (e.g., 1K 234M 2G)

ls -l

total 1649208
-rw-r–r– 1 root root 12486773 May 31 11:14 Discuz_X3.2_SC_UTF8.zip
-rw-r–r– 1 root root 436016467 Sep 21 15:30 jiloc.com.20160921.sql

自动以MB兆,GB显示

ls -lh

total 1.6G
-rw-r–r– 1 root root 12M May 31 11:14 Discuz_X3.2_SC_UTF8.zip
-rw-r–r– 1 root root 419M Sep 21 15:31 jiloc.com.20160921.sql

评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注