0

I want to estimate the amount of disk space used by a user via Apple Remote Desktop Unix command.

I've been trying the following command, running as root

sudo du -sh /users/

but I'd like to add the exclusion to ignore the size of the /users/admin directory.

The du manual shows -I[mask] as the way to do this, but I can't get it to work. Any help please?

1 Answer 1

1
du -sh -Iadmin /Users

will ignore any subdirectory "admin", e.g. /Users/admin - on a Mac. Please check if your target system supports the -I option (man du).

You might probably have to use --exclude=admin instead, if the target system has a GNU coreutils du.

1
  • Perfect thanks - I was trying many variations of -I=admin but as you say, I didn't need the '=' :)
    – MagsM
    Jun 16, 2017 at 17:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .