Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!xanth!cfdl!doron From: doron@cfdl.larc.nasa.gov (Doron Kishoni) Newsgroups: news.newusers.questions Subject: Re: alias rm to write to trash directory Message-ID: <454@cfdl.larc.nasa.gov> Date: 9 Feb 90 18:11:04 GMT References: <13698@phoenix.Princeton.EDU> Reply-To: doron@cfdl.UUCP (Doron Kishoni) Organization: NASA Langley Research Center, Hampton, Va. 23666 Lines: 31 In article <13698@phoenix.Princeton.EDU> subbarao@phoenix.Princeton.EDU (Kartik Subbarao) writes: >In article broadman@paul.rutgers.edu (Allen Broadman) writes: >> >>I would like to have my RM command actually write >>files to a directory TRASH, which I could periodically empty. >> >>2) Is there a way to be reminded to empty the TRASH directory upon >> logging out? Is there an analagous file to .login (.logout perhaps)? > > >Here you are --- > >Script that puts trash in ~/Trash (or whatever you set it to) > >!# /bin/csh -f >set trash = "~/Trash" >while ($#argv) > mv -i $argv[1] $trash # Moves it to the Trash Directory > shift # Next file >end > >Also, put this in your .logout > >/bin/rm ~Trash/* >echo "Trash Emptied" > Nice and easy! 2 typos(?) though: "#!" instead of "!#" on the first line of the first script. "~/Trash/*" instead of "~Trash/*" in the first line of '.logout'