linux 中 ll 指令显示 的大小 是什么单位?

已举报 回答
linux 中 ll 指令显示 的大小 是什么单位?
问在线客服
扫码问在线客服
  • 回答数

    6

  • 浏览数

    5,288

6个回答 默认排序
  • 默认排序
  • 按时间排序

已采纳
linux 中 ll 命令显示 的大小 是以“字节”为单位的。
ll显示的是字节,可以使用-h参数来提高文件大小的可读性,另外ll不是命令,是ls -l的别名
ls -al 是以字节单位显示文件或者文件夹大小;

字节b,千字节kb,
1G=1024M=1024*1024KB=1024*1024*1024B

通常会加参数h来直观显示大小,会使用G、M等来显示大文件
ls -alh
取消 评论
貌似是 dir
你用 help dir 看看具体说明把
取消 评论
fdisk -lDevice Start End Sectors Size Type/dev/sda3 72265728 1953523711 1881257984 897.1G Linux filesystem
df -hFilesystem Size Used Avail Use% Mounted on/dev/sda3 882G 61G 777G 8% /
They’re just measuring different quantities.
fdisk shows your partition’s size: this measures raw sectors on your drive.
df shows usable space. Starting with the 897.1GiB of your partition, you lose some space to your file system’s data structures, resulting in df’s reported 882GiB total. Then you “lose” the reserved space, which you accounted for.
网页链接
取消 评论
df -B SIZE 可以指定你的block size

SIZE may be (or may be an integer optionally followed by) one of following:
KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y
取消 评论
终端输入:df -BG
取消 评论
df命令中没有直接显示G的,不过可以自用grep和awk配合使用,写出一个命令,然后alias就可以了
具体写法忘记了,我给你个思路
alias df -G=df -h|grep 'T'|awk
不好意思,忘记awk的用法了。
取消 评论
ZOL问答 > linux 中 ll 指令显示 的大小 是什么单位?

举报

感谢您为社区的和谐贡献力量请选择举报类型

举报成功

经过核实后将会做出处理
感谢您为社区和谐做出贡献

扫码参与新品0元试用
晒单、顶楼豪礼等你拿

扫一扫,关注我们
提示

确定要取消此次报名,退出该活动?