Post subject: Sum the filesize in linux?
Player (70)
Joined: 8/24/2004
Posts: 2562
Location: Sweden
Hi, I was trying to find a way to sum the output of du -h in linux for a give wildcard such as: 'du -h --max-depth 0 Folder_Containing_My_Wildcard*' I then want to get something like: 959M Folder_Containing_My_Wildcard1 186M Folder_Containing_My_Wildcard2 ----------- TOT: 1145M Is there a good way to do this simple without having to calculate this your self?
Former player
Joined: 12/5/2007
Posts: 716
du -shc folder1 folder2 *.mkv As DeHackEd pointed out, --total makes a stronger point than -c. See the manpage on du or run du --help.
Player (70)
Joined: 8/24/2004
Posts: 2562
Location: Sweden
Thanks. This helped. :)