Sunday, September 23, 2018

linux - Total disk usage for a particular user



I would like to see the total disk usage for myself on a particular file system. I executed the command



du -h ~my_user_name



However, this lists every directory owned by my_user_name. I would like to get the sum total of all of this information. What is the appropriate option to pass? I tried



du -h -c ~my_user_name


but that did not work.


Answer



Passing -s to du will restrict the output to only the items specified on the command line.



du -sh ~


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...