Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ptsfa!amdahl!bnrmtv!rapin From: rapin@bnrmtv.UUCP (Eric Rapin) Newsgroups: comp.unix.wizards Subject: rm() - Bourne shell (Was: Request for human interface etc...) Message-ID: <3140@bnrmtv.UUCP> Date: Thu, 19-Nov-87 19:08:17 EST Article-I.D.: bnrmtv.3140 Posted: Thu Nov 19 19:08:17 1987 Date-Received: Sun, 22-Nov-87 10:41:18 EST References: <763@rocky.STANFORD.EDU> <4472@well.UUCP> Organization: Bell Northern Research, Mtn. View, CA Lines: 32 Summary: What about same file names? In article <4472@well.UUCP>, ustel@well.UUCP (Mark Hargrove) writes: > In a similar vein, we have a shell function defined in /etc/profile > for our Bourne Shell users: > > rm(){ > if [ ! -d /usr/tmp/$LOGNAME ] ; then > mkdir /usr/tmp/$LOGNAME > fi > mv $* /usr/tmp/$LOGNAME > } > [cron stuff deleted] > > Mark Hargrove > U.S. TeleCenters > {backbones}!hplabs!well!ustel I think that there is a problem with this if someone removes files which have the same name but are in different directories. (e.g. "rm foobar" and "rm subdir/foobar") The first saved file will be overwritten by the second. This is fine if this is what is wanted but the inherent assumption is that all files have been saved, which could cause confusion, especially for people who use foobar for file names everywhere :'). Something to think about. Have fun, -- Eric B. Rapin UUCP: {3comvax,amdahl,ames,csi,hplabs}!bnrmtv!rapin Bell-Northern Research, Inc. ARPA: bnrmtv!rapin@ames.arpa Mountain View, California - Don't sweat it, it's only ones and zeros. -