Date: Wed, 17 Jun 1998 11:47:06 +0200 From: Johann Visagie <wjv@cityip.co.za> To: Dan Busarow <dan@dpcsys.com> Cc: Malartre <malartre@aei.ca>, questions@FreeBSD.ORG Subject: Re: /root:"chmod 600 .*" nothing work now Message-ID: <19980617114706.D28994@cityip.co.za> In-Reply-To: <Pine.BSF.3.96.980616081408.24104A-100000@java.dpcsys.com>; from Dan Busarow on Tue, Jun 16, 1998 at 08:21:35AM -0700 References: <19980616120752.H26576@cityip.co.za> <Pine.BSF.3.96.980616081408.24104A-100000@java.dpcsys.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 16 Jun 1998 at 08:21 SAT, Dan Busarow wrote: > > I always try ls -l pattern before doing anything potentially dangerous > that relyies on shell expansion. Knowing for certain what the expansion > will be can be comforting when issuing an rm -r :) I went back to look at Unix Power Tools, where I remember seeing the caveat about two character dotfiles. I found this little script in there. Cut it out, call it (say) "del", and put it somewhere in your $PATH. I think it's quite cute. ;-) ------------------------------------------------------------------------- #!/bin/sh case $# in 0) echo "`basename $0`: you didn't say which file(s) to delete"; exit 1;; [123]) /bin/rm -i "$@" ;; *) echo "$*" echo do you want to delete these files\? read a case "$a" in [yY]*) /bin/rm "$@" ;; esac ;; esac ------------------------------------------------------------------------- -- V Johann Visagie | Email: wjv@CityIP.co.za | Tel: +27 21 419-7878 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980617114706.D28994>