Jump to content

Recommended Posts

Posted (edited)

Is it possible to delete the contents of the recycle bin of items that have been there for longer than N days (say 14)?

 

Hoping a script guru could help? Ta! :)

Edited by elsiegee40
Posted (edited)
but you have to do it manually as there is no physical way to get it to do it automatically

 

But I could use this as a logoff script? :confused:

 

I don't need the number of days to be changeable, just to make sure that old material is dleeted and doesn't build up.

Edited by elsiegee40
Posted
I used this script as a logoff but I get an error. Sorry, I know it's a vague, but that's what I get with everybody when they logoff. Have either of you guys experienced this?
Posted
I used this script as a logoff but I get an error. Sorry, I know it's a vague, but that's what I get with everybody when they logoff. Have either of you guys experienced this?

 

I haven't applied it yet... I'm waiting until we get rid of the kids on Dec 12th before I start messing about!

Posted
use it with the log on script. If you do it with the log off script then you will get errors as it is unable to run. I know that if you do it from log in it will kick in and remove everything from the recycle bin as the said person logs in.
Posted

Our recycle bins are held on the students network drive (a samba share)

We run this through a weekly cron

/usr/bin/find /home/DOMAIN/ -type d -name .recycle -exec rm -rf  {}  \;

  • 1 year later...
Posted
file is attached to this post... Double click it and it does the rest, but you have to do it manually as there is no physical way to get it to do it automatically that I know of, unless someone else is a guru of script!

 

For some reason when running this as either a logon or logoff script as astudent I get a permission denied error on line 14

 

Any ideas?

 

nN

  • 3 months later...
Posted
Sorry to bump an old thread, as it was linked I thought I would add my issue here. I also get permission denied even when added as a log-on or log off script. Any idea's?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...