From owner-freebsd-questions Wed Jun 17 02:48:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA13089 for freebsd-questions-outgoing; Wed, 17 Jun 1998 02:48:44 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from ns.cityip.co.za (ns.cityip.co.za [196.25.223.140]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id CAA13039 for ; Wed, 17 Jun 1998 02:48:32 -0700 (PDT) (envelope-from wjv@cityip.co.za) Received: from wjv by ns.cityip.co.za with local (Exim 1.82 #2) id 0ymEo6-0007YY-00; Wed, 17 Jun 1998 11:47:06 +0200 Message-ID: <19980617114706.D28994@cityip.co.za> Date: Wed, 17 Jun 1998 11:47:06 +0200 From: Johann Visagie To: Dan Busarow Cc: Malartre , questions@FreeBSD.ORG Subject: Re: /root:"chmod 600 .*" nothing work now Mail-Followup-To: Dan Busarow , Malartre , questions@FreeBSD.ORG References: <19980616120752.H26576@cityip.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: ; from Dan Busarow on Tue, Jun 16, 1998 at 08:21:35AM -0700 X-PGP: ftp://ftp.cityip.co.za/users/wjv/pubkey.asc X-URL: http://www.cityip.co.za/~wjv/ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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