🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.sysadmin
Article #406

Re: .NextTrash woes...

#406
From: L J "Jim" Kiraly
Date: Fri, 07 Aug 1992 15:14
47 lines
2471 bytes
In article <1992Aug6.183858.3316@serval.net.wsu.edu> tspencer@tek4.eecs.wsu.edu  
(Tim Spencer - EECS System Staff Slave) writes:
>Hello!  We have a bunch of NeXTs on a mixed network with lots and lots of
>NFS mountings everywhere, and the NeXTs are always generating .NextTrash
>directories all over in places where they are not appreciated.  Is there
>a global dwrite that can stop this?  Any other fun solutions?  Any help would
>be vastly appreciated!  Thanks, and have fun!
>
I posted our solution to this very same problem a while ago.  This empties the  
recyclers but doesn't prevent them from being created:

-----------
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 1 day old and empties  
all of the user accounts (in /user on our machines) NFS mounted directories  
(/clients) and other stuff.  Just edit the searchlist to whatever is  
appropriate for your site and add it to your daily file.  Note if the  
directories specified in the searchlist don't exist, nothing happens-  

NOTE THE EMBEDDED...    rm -rf {}   ...  AND 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, including NFS mounted directories

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: <1992Aug7.151426.8667@eagle.lerc.nasa.gov>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!data.nas.nasa.gov!eagle!news
References: <1992Aug6.183858.3316@serval.net.wsu.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.sysadmin
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!data.nas.nasa.gov!eagle!news
From: jim@ljkiraly.lerc.nasa.gov (L J "Jim" Kiraly)
Subject: Re: .NextTrash woes...
Message-ID: <1992Aug7.151426.8667@eagle.lerc.nasa.gov>
Sender: news@eagle.lerc.nasa.gov
Organization: NASA/LeRC
References: <1992Aug6.183858.3316@serval.net.wsu.edu>
Date: Fri, 7 Aug 1992 15:14:26 GMT
Lines: 47