Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-29-2005, 11:17 AM   #1
Registered: Aug 2005
Location: Europe
Posts: 63

Rep: Reputation: 15
Question Another question on automatic file deletion

Hi, me again

got it working on an hourly basis, but I have one more issue

This command

find /raid/shared/ -mtime +2 -type f -exec rm -rf {} \;

Deletes all files created 2 days before the current.

Problem is, this folder is used internally for file exchange, and I need it to delete all files which were copied to this folder more than two days ago, not files which were created more than two days ago.

In other words, if I have a file from '99, and I copy it to the folder, the script would delete it on the hour (its in cron.hourly), however, I need it to delete it in two days time.

Any help plz?

Thanks, you guys are great
Old 08-29-2005, 11:18 AM   #2
Registered: Aug 2005
Location: Europe
Posts: 63

Original Poster
Rep: Reputation: 15
Sorry, forgot, still on Red Hat 9 latest everything.


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
File Deletion mhkhalqani Linux - General 1 10-12-2005 03:08 AM
Automatic file deletion Azhrarn Linux - Newbie 5 08-30-2005 05:01 AM
Problem with file-deletion after a while JohnWayne Linux - General 3 07-26-2004 12:57 PM
Automatic deletion of spam folder? RKris Linux - General 1 05-27-2003 08:21 AM
Perl and file deletion berry Programming 4 05-29-2002 06:42 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:15 AM.

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