I\'m trying to write a script that will calculate a directory size and if the size is less than 10GB, and greater then 2GB do some action. Where do I need to mention my fol
You can do:
du -h your_directory
which will give you the size of your target directory.
If you want a brief output, du -hcs your_directory is nice.
du -hcs your_directory