I am checking the file sizes of /tmp directory using du -h, but I also would like to have the ownership information of those files. There is a simple way to do this? I looked at the du manual and it seems to not have any option for this.
Thank's in advance.
du
doesn't support sorting or analyzing disk usage by user. Look here: superuser.com/questions/597168/…du
output. If you're saving the results to a file, this is fine, but on the console the lines will not be generated in real time, because of pipe buffering (which you can disable at the cost of even more complexity). If this is of interest, I can put a script outline in an answer, but it's too complex for a comment.ls
anddu
, assuming that the output of those two commands are sorted in the same way.