mardi 28 juillet 2015

Getting total size of only files in bash

I have tried:

for line in `ls`; do if [ -f $line ]; then du -h $line ;fi done

I want to calculate total size of all files.

Update

I want to capture total size of files and directories separately

Aucun commentaire:

Enregistrer un commentaire