Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!samsung!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.questions Subject: Re: files recovery after rm? Message-ID: <1989Nov9.162314.4713@virtech.uucp> Date: 9 Nov 89 16:23:14 GMT References: <16608@uhnix1.uh.edu> <20530@unix.cis.pitt.edu> Organization: Virtual Technologies Inc. Lines: 37 In article <20530@unix.cis.pitt.edu>, yahoo@unix.cis.pitt.edu (Kenneth L Moore) writes: > I use the following aliases in my .tshrc and .cshrc > > alias rm 'mv -f \!:* /tmp' > alias unrm 'mv /tmp/\!:* .' > > Note that \!:* allows for the use of variable names. Also note that multiple people using the same aliases will eventually run into problems when 1. /tmp runs out of space. 2. two people rm a file with the same name. 3. the same person rm's a file with the same name from two places. Also, since /tmp is frequently used by lots of programs, leaving files in those directories for a long period of time will result in the size of the directory growing and can have a significant performance impact on the entire system. > Note further that tmp is writable by everyone. in a sense. Current systems use a sticky bit for a directory which means that everybody has write permission in the directory unless it clashes with a pre-existing file in that directory. Then only root or the owner of the file has write permission on the file. This means that two people using your alias with files that have the same base name will cause the second users rm to fail. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+