Pop quiz for all those hackers out there: what's wrong with this
command? Besides the fact that it was run from cron in the middle of
the night as root, I mean. (Broken up into multiple lines for
readability -- it was originally issued as one monster command from
cron.)
here# rsh there 'cd /projects/team/task/results ; \
for i in * ; do \
if [ ! -h /net/here/projects/team/task/result/$i ] ; then \
echo Removing /projects/team/task/results/$i ; \
rm -rf $i & \
fi ; \
done ' &
Hint: The 'cd' is the fatal flaw. Why?
Ouch. Ouch ouch ouch ouch
The good news is that the backups work properly. :)