linux怎样查看js文件大小,Linux查看文件夹大小的命令

[root@ns1 opt]#  du -h -s /* | sort

12K     /mnt

13M     /sbin

16K     /lost+found

1.8G    /usr

194M    /root

22G     /opt

24K     /tmp

4.0K    /initrd

4.0K    /misc

424K    /dev

4.5M    /boot

4.9M    /bin

61M     /var

8.0K    /home

81M     /lib

903M    /proc

9.1M    /etc

-------------

查看linux文件目录的大小和文件夹包含的文件数

统计总数大小

du -sh xmldb/

du -sm * | sort -n //统计当前目录大小 并安大小 排序

du -sk * | sort -n

du -sk * | grep guojf //看一个人的大小

du -m | cut -d "/" -f 2 //看第二个/ 字符前的文字

-------------

du -sh 文件或目录名

用法:du [选项]... [文件]...

总结每个的磁盘用量,目录则取总用量。

长选项必须用的参数在使用短选项时也是必须的。

-a, --all write counts for all files, not just directories

-B, --block-size=SIZE use SIZE-byte blocks

-b, --bytes print size in bytes

-c, --total produce a grand total

-D, --dereference-args dereference FILEs that are symbolic links

-h, --human-readable 以容易理解的格式印出文件大小 (例如 1K 234M 2G)

-H, --si 类似 -h,但取 1000 的次方而不是 1024

-k 即 --block-size=1K

-l, --count-links 连硬链接的大小也计算在内

-L, --dereference 找出任何符号链接指示的真正目的地

-S, --separate-dirs 不包括子目录的占用量

-s, --summarize 只分别计算命令列中每个参数所占的总用量

-x, --one-file-system skip directories on different filesystems

-X FILE, --exclude-from=FILE Exclude files that match any pattern in FILE.

--exclude=PATTERN Exclude files that match PATTERN.

--max-depth=N print the total for a directory (or file, with --all)

only if it is N or fewer levels below the command

line argument; --max-depth=0 is the same as

--summarize

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值