Tuesday, June 8, 2010

user file directory hdd stat to log file

====

du -k /home-nis/userName/* | sort -nr | cut -f2 | xargs -d '\n' du -sh > v.log

Output sample from the v.log (saved output to file) -> ...

#> cat v.log

3.9G /home-nis/vitalie/Documents
3.1G /home-nis/vitalie/Documents/Microsoft.Student.With.Encarta.Premium.2009-XiSO
2.6G /home-nis/vitalie/downloads
299M /home-nis/vitalie/workspace
205M /home-nis/vitalie/workspace/VDRC_NEXT

etc ...

Thank you

No comments:

Post a Comment