🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.misc
Article #713

Re: Three simple questions.. :)

#713
From: L J "Jim" Kiraly
Date: Wed, 05 Aug 1992 12:01
53 lines
2283 bytes
In article <1992Aug3.220406.16941@muddcs.claremont.edu>  
gene@icarus.claremont.edu (Gene C. Van Nostern) writes:
>In article <1992Aug1.030126.13089@nmsu.edu> rscott@spock.NMSU.Edu (Joseph  
>Good) writes:
>> 
>> 1)	Is there a UNIX command to empty the recycler?  I know that I am 
>> 	just being completely lazy, but I would like to chunk anything  
>that
>> 	I forgot, when I log out.  Also, I know about the .login file, is
>> 	there a .logoff(out) file that will execute commands and stuff  
>when
>> 	I log out?
>> 
>
>(1) Try
>
>% \rm ~/.NeXT/.NextTrash/*
>

We run a script as part of the /usr/adm/daily file to search for and empty  
NextTrash directories.  This gets rid of all files over i day old and empties  
all of the user accounts (in /user on our machines) NFS mounted directories,  
and other stuff.  Just edit this and add it to your daily file-  

NOTE THE EMBEDDED...    rm -rf $J   ...  USE AT YOUR OWN RISK!!

-------------------
# ---  Empty the Recycler(s)   --- added by Jim Kiraly July 9, 1992
# Removes files (incluing subdirectories) which haven't
# changed after a day's time

searchlist="/.NeXT/.NextTrash /.NextTrash /clients/.NextTrash  
/me/.NeXT/.NextTrash /user"
for i in $searchlist
do
  if [ -d $i ]
    then
      trashlist=`find $i -type d -name .NextTrash -prune -print`
        for j in $trashlist
          do
            > $j/TeMpTeSt
            rm $j/TeMpTeSt
            echo 'Removing files more than 1 day old from recycler: '$j
            find $j -ctime +1 -depth -exec rm -rf {} \;
          done
  fi
done


--
__________________________________________________________________
Jim Kiraly- jim@ljkiraly.lerc.nasa.gov- NASA Lewis Research Center
----------------- NeXT Mail preferred ----------------------------
Technical Details
Message-ID: <1992Aug5.120119.18052@eagle.lerc.nasa.gov>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!wupost!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!eagle!news
References: <1992Aug3.220406.16941@muddcs.claremont.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!wupost!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!eagle!news
From: jim@ljkiraly.lerc.nasa.gov (L J "Jim" Kiraly)
Subject: Re: Three simple questions..  :)
Message-ID: <1992Aug5.120119.18052@eagle.lerc.nasa.gov>
Sender: news@eagle.lerc.nasa.gov
Organization: NASA/LeRC
References: <1992Aug3.220406.16941@muddcs.claremont.edu>
Date: Wed, 5 Aug 1992 12:01:19 GMT
Lines: 53