LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-17-2004, 03:29 PM   #1
RaelOM
Member
 
Registered: Dec 2004
Posts: 110

Rep: Reputation: 16
Find acting wierd


-mtime is based on 24 hours.

Running your commant with -mtime +0 will not return any of the files in the /u02/backup directory as none of those files are more than 24 hours old. Granted today is the 17th and yesterday was the 16th, the oldest file in that dir is: 16:50, right now it's only 15:24 --not quite 24 hours old.

Running -time +1 will return all files older than 48 hours. Now in the find manual it says X*24 soo you'd think -mtime +2 would be 48, but for some odd reason it's treating it like 72 hours.

The exact command I'd like to use is:

Code:
find . * -mtime +2 -exec rm {} \;
However, until I fix this I'm using:

Code:
find . * -mtime +2 -exec ls -la {} \;
I'm looking to find all files within a directory that are older than 72 hours and remove them.

Simple right? Well, I don't mind slapping find into working using +2 to reutnr 72, but I can't get it outta my head that 2*24 == 48 but it's not.

What gives?
 
Old 12-17-2004, 03:42 PM   #2
JunctaJuvant
Member
 
Registered: May 2003
Location: Wageningen, the Netherlands
Distribution: OS X & Linux Mint
Posts: 488

Rep: Reputation: 31
Perhaps the "+" means values are added to the default value of 24, thus with +1 you get 24 + (1*24) = 48 and with +2 you get 24 + (2*24) = 72
But maybe someone else has a more plausible explanantion?

JJ
 
  


Reply



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
audacity acting up mushmaster Linux - Software 3 10-21-2005 05:10 PM
dc_gui acting wierd sharadshankar Linux - Software 0 06-08-2005 06:53 PM
Acidrip acting wierd MeMo_oMeM Linux - Software 1 11-02-2004 05:11 PM
sound is acting wierd... zorr0 Linux - General 2 05-18-2004 06:38 AM
XawTV, Acting Wierd... jlacroix Fedora 1 01-10-2004 01:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:46 PM.

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