- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- find atime mtime purge oracle log
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
06-23-2004 02:02 PM
06-23-2004 02:02 PM
find atime mtime purge oracle log
I just wondering why the following command doesn't work
find /oracle/TRP/saparchlocal -name '*arch*dbf' -atime +1 -print -exec ls -al {} \;
I have the following file in this directory I only want to list out those file where the timestamp is more than 1 day. I have tried mtime but doesn't seem to work as well. Please help.
-rw-rw---- 1 oratrp dba 41942016 Jun 22 12:00 TRParch1_2420.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 22 12:33 TRParch1_2421.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 22 12:36 TRParch1_2422.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 22 12:38 TRParch1_2423.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 22 12:41 TRParch1_2424.dbf
-rw-rw---- 1 oratrp dba 41942016 Jun 22 12:51 TRParch1_2425.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 22 14:07 TRParch1_2426.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 22 14:08 TRParch1_2427.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 22 14:09 TRParch1_2428.dbf
-rw-rw---- 1 oratrp dba 41938944 Jun 22 14:10 TRParch1_2429.dbf
---------- 1 oratrp dba 6618112 Jun 22 15:30 TRParch1_2430.dbf
---------- 1 oratrp dba 0 Jun 22 16:45 TRParch1_2431.dbf
---------- 1 oratrp dba 0 Jun 22 17:45 TRParch1_2432.dbf
---------- 1 oratrp dba 0 Jun 22 17:45 TRParch1_2433.dbf
---------- 1 oratrp dba 0 Jun 22 17:45 TRParch1_2434.dbf
---------- 1 oratrp dba 0 Jun 22 18:00 TRParch1_2435.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 22 20:05 TRParch1_2436.dbf
-rw-rw---- 1 oratrp dba 41942016 Jun 22 22:30 TRParch1_2437.dbf
-rw-rw---- 1 oratrp dba 41942016 Jun 22 23:31 TRParch1_2438.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 22 23:34 TRParch1_2439.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 01:01 TRParch1_2440.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 04:30 TRParch1_2441.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 07:30 TRParch1_2442.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 07:33 TRParch1_2443.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 07:36 TRParch1_2444.dbf
-rw-rw---- 1 oratrp dba 41942016 Jun 23 09:26 TRParch1_2445.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 10:45 TRParch1_2446.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 11:09 TRParch1_2447.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 11:10 TRParch1_2448.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 11:10 TRParch1_2449.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 12:32 TRParch1_2451.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 12:43 TRParch1_2452.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 14:04 TRParch1_2453.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 15:25 TRParch1_2454.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 16:30 TRParch1_2455.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 17:31 TRParch1_2456.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 17:34 TRParch1_2457.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 18:18 TRParch1_2458.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 19:55 TRParch1_2459.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 20:36 TRParch1_2460.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 23:02 TRParch1_2461.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 23:32 TRParch1_2462.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 23:34 TRParch1_2463.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 23:37 TRParch1_2464.dbf
-rw-rw---- 1 oratrp dba 41942016 Jun 24 03:00 TRParch1_2465.dbf
-rw-rw---- 1 oratrp dba 41943040 Jun 24 06:02 TRParch1_2466.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 24 07:33 TRParch1_2467.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 24 07:35 TRParch1_2468.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 24 09:56 TRParch1_2469.dbf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2004 04:13 PM
06-23-2004 04:13 PM
Re: find atime mtime purge oracle log
To find the files with timestamp more than one day +1 is correct.
The find with -ctime for changed time,-mtime for modified time and -atime for accessed time.
So -mtime option,we have to do the modification in that file.
Regards,
Muthukumar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2004 06:43 PM
06-23-2004 06:43 PM
Re: find atime mtime purge oracle log
you should keep in mind that certain backup methods affect (update) the access timestamp - a simple copy also does.
+1 means "more than 24 hours" so the result will also depend on the time the command is executed.
You should also protect your wildcards with qoutes in order to prevent the automatic filename expansion in the current directory, i.e. the wildcards must not be expanded before the shell starts executing the commands.
Btw: the listing of the files with no permissions indicate that something went wrong during af copy/backup operaton; perhaps a full filesystem.
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2004 06:45 PM
06-23-2004 06:45 PM
Re: find atime mtime purge oracle log
To list the files that are 24 hours older you use as you did
find /path -name "*string*" -mtime +1 -exec ls -l {} \;
So with your find (say if you executed your find at 20:00 hours on 24-JUN-04) you should get listing of the files
-rw-rw---- 1 oratrp dba 41944064 Jun 23 18:18 TRParch1_2458.dbf
-rw-rw---- 1 oratrp dba 41944064 Jun 23 19:55 TRParch1_2459.dbf
If you wanted files that are older than a given time then user the -newer parameter of find.
1. touch a file with a given time as
touch CCYYMMDDHHMMSS
2. find /path -name "*string*" -newer touch_file -exec ll {} \;
This will list all the files older that the touched file.
Indira A
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2004 06:57 PM
06-23-2004 06:57 PM
Re: find atime mtime purge oracle log
as this is SAP Environment and you probably backup the archivelogs with brarchive and the -cds option, keep in mind that brarchive accesses these file for reading two times before they are deleted.
So if you run "brarchive -cds" each day, atime will never be greater than 1,0 days, because brarchive will access the file and reset atime, and next day it will delete the file.
Since no one writes to these files beside the archiver process, ctime should be sufficiant for you.
Hope this helps
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2004 07:04 PM
06-23-2004 07:04 PM
Re: find atime mtime purge oracle log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2004 07:08 PM
06-23-2004 07:08 PM
Re: find atime mtime purge oracle log
the information is kept in the inode for the file in question: the "ls -al" shows the time of the last change, like "mtime".
"ls -lu" shows the last time the file was accessed, like "atime".
regards,
John K.