Getting the size of a directory in unix shell Getting the size of a directory in unix shell unix unix

Getting the size of a directory in unix shell


It seems you missed to use command substitution on your echo line.You have to enclose your call to du -sh with backticks like this

echo "size is:" `du -sh` "...."