- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Powerfull Find
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2008 03:41 AM
тАО09-22-2008 03:41 AM
Re: Powerfull Find
> Dears Dennis Handly and James R. Ferguson, I have this idea already, creating a script and calling it from find command.
Well, that's exactly what Dennis suggested originally to you! I presented an alternative, less direct answer to your original query (using 'find' and a pipe to 'cpio'). I think you have everything you need to make your decision.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2008 10:47 AM
тАО09-22-2008 10:47 AM
Re: Powerfull Find
Dear Kevin, I would like to ask you about the "!" mark. if you put it before -newer option is it mean find older files not newer onec ?
I think I can solve this by moving the all directory to temporary directory and then find all the files newer than certain date as Kevin suggest and the returen those back with there directories to source directory. doing this I can save a lot of I/O because I'm dealing with more than 2,500,000 files.
-----------------
Again Kevin, thank for -prune option, I will write tomorowo script that have to go to every directory and count the number of files. So, I think this can help me with find.
-----------------
Dear JRF, I will read more about cpio, and feedback soon.
Thanks all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2008 10:54 AM
тАО09-22-2008 10:54 AM
Re: Powerfull Find
The opposite of newer is "NOT newer". Which is older or the same time.
>I think I can solve this by moving the all directory to temporary directory
What's wrong with my "mv" solution? (You can still use -newer if you want.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2008 10:31 PM
тАО10-26-2008 10:31 PM
Re: Powerfull Find
I would like to ask about -mtime option.
In case you need to take all the files that were modified more than to days you need to use "-mtime +2". But this actually not finding all the files. Is this happened with you guys?
I have to put another find with -mtime 2 option to achieve my goal.
Any ideas ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2008 11:05 PM
тАО10-26-2008 11:05 PM
Re: Powerfull Find
What's your goal? -mtime +2 should be all files modified more than 2*24 hours ago.
Have you read find(1)?
http://docs.hp.com/en/B2355-60130/find.1.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2008 01:40 AM
тАО10-27-2008 01:40 AM
Re: Powerfull Find
I want to know the difference between -mtime 1 & -mtime +1. In Sun +1 mean find all files that modified time is more than 24 hour.
Look at this:
touch -t 0810250000 file
touch -t 0810260000 file1
touch -t 0810270000 file2
touch -mt 0810270000 file3
touch -mt 0810260000 file4
#ls :
Oct 25 00:00 file
Oct 26 00:00 file1
Oct 26 00:00 file4
Oct 27 00:00 file2
Oct 27 00:00 file3
# find . -mtime +1
./file
# find . -mtime 1
./file1
./file4
----
I think "find . -mtime +1" suppose to display "find . -mtime 1" result.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2008 01:54 AM
тАО10-27-2008 01:54 AM
Re: Powerfull Find
+n means more than n, -n means less than n, and n means exactly n.
here it is n * 24 hours.
Aneesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2008 02:28 AM
тАО10-27-2008 02:28 AM
Re: Powerfull Find
So why the first command didn't find ./file1 , ./file4 files ?
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2008 03:25 AM
тАО10-27-2008 03:25 AM
Re: Powerfull Find
Try #find . -mtime +0 you will get it .
fyi:-
True if the file modification time subtracted
from the initialization time is n-1 to n
multiples of 24 h. The initialization time
shall be a time between the invocation of the
find utility and the first access by that
invocation of the find utility to any file
specified in its path operands.
Aneesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2008 04:56 AM
тАО10-27-2008 04:56 AM
Re: Powerfull Find
How can we tell if you don't tell us what time it is?
From find(1) there is a 24 hour fuzziness in -mtime n, perhaps there is for +n?