- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: File archiving tar find for files that are cu...
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
Forums
Discussions
Discussions
Discussions
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
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
02-12-2004 12:24 AM
02-12-2004 12:24 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2004 12:27 AM
02-12-2004 12:27 AM
Re: File archiving tar find for files that are current
You can use the touch command to create a reference file with a specifed date and time. Then you can use find with -newer option to find the files more recent than the reference file.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2004 12:36 AM
02-12-2004 12:36 AM
Re: File archiving tar find for files that are current
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2004 12:37 AM
02-12-2004 12:37 AM
Re: File archiving tar find for files that are current
root other 0 Feb 12 00:01 reffile
cuba2:/nsr/index> find . -newer reffile -exec ls -l {} \; |more
total 0
drwxr-xr-x 3 root other 96 Mar 13 2001 abaco
drwxr-xr-x 3 root root 96 Feb 28 2003 disko
drwxr-xr-x 3 root root 96 Jan 31 2002 duke
drwx------ 3 root root 96 Feb 12 06:41 everest
drwxr-xr-x 3 root other 96 Oct 8 2001 folly
ns.com
drwxr-xr-x 3 root root 96 Mar 13 2001 java
drwxr-xr-x 5 root other 96 Mar 13 2001 zurich
total 16568
-r--r--r-- 1 root other 236 Feb 5 01:02 4021dc68.k0
-r--r--r-- 1 root other 192 Feb 5 01:02 4021dc68.k1
-r--r--r-- 1 root other 3660 Feb 5 01:02 4021dc68.rec
-r--r--r-- 1 root other 1148 Feb 5 01:35 4021dc73.k0
-r--r--r-- 1 root other 828 Feb 5 01:35 4021dc73.k1
-r--r--r-- 1 root other 17344 Feb 5 01:35 4021dc73.rec
-r--r--r-- 1 root other 1004 Feb 5 02:38 4021e44f.k0
-r--r--r-- 1 root other 768 Feb 5 02:38 4021e44f.k1
-r--r--r-- 1 root other 10784 Feb 5 02:38 4021e44f.rec
-r-------- 1 root other 204 Feb 5 02:05 4021eb3b.k0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2004 12:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2004 12:51 AM
02-12-2004 12:51 AM
Re: File archiving tar find for files that are current
I tried it as well and noticed some inconsistent results unless I restricted it to just files with -type f (as Robert-Jan suggested). Try that and see what you get!
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2004 01:16 AM
02-12-2004 01:16 AM
Re: File archiving tar find for files that are current
A couple of ways around this are: 1) use the '-type f' argument to find to only look for files. 2) when doing the ls use 'ls -ld' to restrict the ls to just showing the dirname and not the contents of the directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2004 01:22 AM
02-12-2004 01:22 AM
Re: File archiving tar find for files that are current
what about:
find /directory -mtime -1 -print
?
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2004 01:23 AM
02-12-2004 01:23 AM
Re: File archiving tar find for files that are current
should be:
find /directory -mtime -1 -type f -print
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2004 01:26 AM
02-12-2004 01:26 AM
Re: File archiving tar find for files that are current
"the find command looks like it uses the 24 hour break"
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2004 03:09 AM
02-12-2004 03:09 AM
Re: File archiving tar find for files that are current
"the find command looks like it uses the 24 hour break"
I am sorry, but this eludes my English. ;-)
You forget, me German! ;-))
What does it mean?
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2004 03:25 AM
02-12-2004 03:25 AM
Re: File archiving tar find for files that are current
Loosely translated, it means that -mtime +1 will match files created between midnight yesterday and midnight the day before. James was looking for a solution that would identify only the files created within the last 24 hours: from 7:00 AM this morning to 7:00 AM yesterday morning.
Hope that helps!
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2004 03:38 AM
02-12-2004 03:38 AM
Re: File archiving tar find for files that are current
I understood so.
He, that is able to read, is in the advantage! If you read carefully my post, you will notice, that I said -mtime -1 and not -mtime +1. :^)
-mtime -1 gets all files younger than 24h
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2004 02:01 AM
02-13-2004 02:01 AM
Re: File archiving tar find for files that are current
As an alternative to the suggestions already made, you could use fbackup to take a full backup of your indexes, then use the incremental function of fbakup to get only the changed (or new) files.
See man fbackup.
Regards,
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2004 02:07 AM
02-13-2004 02:07 AM