繁体   English   中英

获取linux目录下用户磁盘使用情况的命令

[英]Command to get the disk usage by a user in a directory in linux

我想获得特定用户使用的 memory,例如:abcd,在特定位置 (/location/here/)。 我试过“find -user abcd | du -sh /location/here/ ”但它不起作用。

能否请你帮忙?

谢谢,阿妮拉

像这样尝试,结果以字节为单位。

find /location/here -user abcd-exec du -b {} \; 2>/dev/null | awk 'BEGIN {a=0} {a=a+$1} END {print a}'

干杯

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM