sean finney on 17 Aug 2010 12:40:33 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] using rm -rf


On Sat, Aug 14, 2010 at 03:30:15PM -0400, JP Vossen wrote:
> >Date: Sat, 14 Aug 2010 00:00:14 -0400
> >From: Gordon Dexter<gordon@texasdex.com>
> >
> >I know I'm not the best shell scripter but this one seems to work.
> >Watch out though, I once managed to accidentally delete the contents of
> >/bin on one of the campus servers with a shell script I wrote that was
> >supposed to delete old webcam images.:-)
> [...]
> >     rm -rf $TMPDIR/snap_*
> 
> Watch out for that kind of thing.  This one is OK, but guess what
> happens if:
> 	unset TMPDIR
> 	rm -rf $TMPDIR/*

this is a great use case for "set -u" btw :)

Attachment: signature.asc
Description: Digital signature

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug