Quote:
Originally posted by druuna
Take a look at the du command.
$ du -h -s /home/
484M /home
The above command will count all subdirs too. The following command does not:
$ du -S -s -h /home
4.0K /home
See the manpage for more options.
|
Thanks, that's the first part that I need now
but I'm still stuck, how do I get the numerical value into a variable. I can get the entire output into a variable.
Using your first example
484M /home
how do I get the 484 by itself so I can compare? I've been to several sites with great looking tutorials, but they all seem to lack clarity, I'm finding them confusing and they don't show examples useful to me.
Thanks for the help.