码迷,mamicode.com
首页 > 其他好文 > 详细

osx的du以字节计算

时间:2019-01-26 19:32:44      阅读:289      评论:0      收藏:0      [点我收藏+]

标签:post   bar   grid   director   only   etc   -name   color   dir   

https://stackoverflow.com/questions/5794437/difference-in-size-shown-by-du-command-and-get-info-on-mac-os-x

https://superuser.com/questions/520338/only-get-the-size-from-du-command-not-the-folder-names

https://stackoverflow.com/questions/18689592/how-to-get-file-size-in-bytes-from-shell-script

https://unix.stackexchange.com/questions/19882/directory-size-calculation-difference

 

 

Unix equivalent of `du -sb` to get summarized size in bytes

On Linux using GNU du to calculate the size of directory recursively in bytes I can run:

du -sb /etc

What is equivalent syntax for BSD du based on the fact that -b parameter is not available?

find $HOME | xargs stat -f%z | awk ‘{ s+=$1 } END { print s }‘

...crawls thru $HOME, gets file sizes in bytes from stat and sums them up using awk.

osx的du以字节计算

标签:post   bar   grid   director   only   etc   -name   color   dir   

原文地址:https://www.cnblogs.com/timxgb/p/10324651.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!