[Klug-general] Bash script to delete folders if they exists
Benjamin Donnachie
benjamin at py-soft.co.uk
Fri Jul 16 19:17:01 UTC 2010
On 16 July 2010 12:28, Nathan Friend <nathan.friend at gmail.com> wrote:
> It's for user folders on a mac. So the path is actually /Users/username
The following will output each user's home directory under MacOSX:
for i in `dscl . -list /Users NFSHomeDirectory | awk '{ print $2 }'`; do
echo $i
done
I use it as part of an install postflight script; might prove useful to you too.
Ben
More information about the Kent
mailing list