du command?

I learned a little bit about this command (du) to find out how much space a directory takes up but what I want to know is can you tell it to exclude directories?
For instance, I wanted to know how large the / directory is on my old suse10 drive but I want to exclude /home (/home was not a separate partition on that drive).


info du

to get all the option I think what you may want is the -x option

du -sh --one-file-system / is what you’d want to run to get that.

-s gives only a summary, rather than showing the size of every file and folder contained in the path you give (in this case, /)
-h outputs in human readable terms (M,G)
–one-file-system does exactly that.

If you wanted to know how large every folder on / is (like /tmp, /var, /usr) you’d run this: du -sh --one-file-system /*

I find info hard to navigate, so,

du --help
man du 

That would still include /home unless it was on a separate partition. The exclude (-x) is what’s wanted.