'cd' ing inside a shell script
Grant Peel
gpeel at thenetnow.com
Tue Nov 7 14:37:30 UTC 2006
Hi all,
Some of my webmail users are using lots of disk space.
I want to make a shell script, like so:
cd /home/webmail/public_html/cgi-bin/etc/users ; du -h -d1 | grep M | sort -nr -k1
and run it daily in a cronjob, mailing the results to my assistants.
with the 'cd' at that start of the script have any adverse affect on the rest of the system or cronjobs? OK, will the scripot just complete and exit, with the 'cd' having no affect?
-Grant
More information about the freebsd-questions
mailing list