LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-21-2016, 12:59 PM   #1
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Rep: Reputation: 169Reputation: 169
Autotrash not emptying trash


I have this in crontab, but it is not emptying the trash.

Code:
@daily /usr/bin/autotrash -d 1
 
Old 07-21-2016, 02:12 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
@daily is a shortcut for 0 0 * * * i.e 0000 (midnight). If the system clock is configured for UTC then figure out the offset hours. If the computer is not running 24/7 or at 0000 then your cron job is not going to run. A better solution would be @boot or an anacron daily job.

Did you check the cron logs to see if it actually ran or if there were any errors? I assume you installed autotrash and verified that it ran from the command line.
 
1 members found this post helpful.
Old 07-21-2016, 09:38 PM   #3
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
My script did not run.

I may use this

Quote:
rm -rf /home/andy/.local/share/Trash/files/*
 
Old 07-22-2016, 05:01 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
Was the computer running?
Did you use crontab -e to add the cron job?
 
Old 07-22-2016, 11:16 AM   #5
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
I used @reboot.

Computer was not running at midnight.

I manually edited crontab.
 
Old 07-22-2016, 11:20 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
Is your cron job running now?
 
Old 07-22-2016, 04:14 PM   #7
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
No, the trash has not been emptied.
 
Old 07-22-2016, 04:18 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
Have you rebooted your computer since you changed the cron job to @reboot?
Have you check the logs to see if it ran?
 
Old 07-22-2016, 04:25 PM   #9
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
I am not sure which file has the log ?
 
Old 07-22-2016, 04:29 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
Look at /var/log/syslog
 
Old 07-22-2016, 04:41 PM   #11
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
That file is really big.

I search for autotrash but found nothing.

I did notice that older files were deleted from trash.

I guess it's working ?

I deleted a couple of files dated several years old, and they never made it to the trash.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Autotrash – Purges files from your trash based on age and/or filename LXer Syndicated Linux News 0 08-07-2013 04:21 PM
Emptying Trash mickeyboa Fedora 2 01-06-2007 03:16 PM
Emptying trash as root timelord726 Linux - General 4 08-18-2004 01:26 AM
Having trouble emptying the Trash in Redhat 9, Gnome cgoerner Linux - Newbie 2 05-28-2004 04:40 AM
Emptying trash kinkybullet Linux - Newbie 1 05-12-2004 04:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 12:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration