Path: utzoo!attcan!uunet!ginosko!usc!polyslo!apippin From: apippin@polyslo.CalPoly.EDU (Pinhead@Spikes.slo.ca.EDU) Newsgroups: comp.unix.questions Subject: Re: How to recover (and remove) UNIX files Summary: 1 liner's using 'alias' Keywords: Another way... Message-ID: <13768@polyslo.CalPoly.EDU> Date: 24 Aug 89 22:08:16 GMT References: <3639@uokmax.UUCP> Reply-To: apippin@polyslo.CalPoly.EDU (Pinhead@Spikes.slo.ca.EDU) Distribution: na Organization: Viking Tours & Travels Lines: 37 jeffm@uokmax.UUCP (Jeff Medcalf) writes: ~The following shell scripts are: ~ rm -- remove files to compressed storage in /usr/tmp/.$USER ~ unrm -- bring those files back ~ rml -- list files "removed" ~ rmclean -- clean up /usr/tmp/.$USER [Scripts deleted.] Instead of using shell scripts, here is a way of accomplishing the same thing using 'alias': rm: To move a file into a predefined directory. alias rm '\mv \!* ~/.trash' del: To REALLY delete a file (use sparingly!) alias del '\rm' grab: To place a copy of the deleted file into the current directory. alias grab 'cp ~/.trash/\!* .' show: List files in 'delete directory'. alias show 'ls -sAF ~/.trash' empty: To clean out files in 'delete directory' alias empty '\rm -r ~/.trash/* >& /dev/null; \rm ~/.trash/.* >& /dev/null' It does not compress the files, and a directory must be present (I have mine called '~/.trash') ~jeffm@uokmax.UUCP Jeff Medcalf jeffm@uokmax.ecn.uoknor.edu a. -- Andy Pippin "Do you think God gets stoned? Look at the apippin@polyslo.CalPoly.EDU platypus... I think so." - R. Williams