-3

I need to use "cd" on a shell script: move to the directory $home/folder/sub-folder and then check with a conditional statement if the directory's size is more than 2 MB.

How could I accomplish this? Thanks in advance.

soulblazer
  • 1,178
  • 7
  • 20
  • 30

1 Answers1

1

As a suggestion, you should definitively take a look at man du. Something like that might be a good starting point:

du -s $home/folder/sub-folder
Sylvain Leroux
  • 50,096
  • 7
  • 103
  • 125