- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- find -mtime +1 nor working
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
01-24-2007 01:04 AM
01-24-2007 01:04 AM
Am trying to display (and later delete) files from /var/tmp. The files I want to find are of the form o*.tmp
I am using this command:
find o*.tmp -mtime +1 -print
This command finds no matching files , yet there are files that meet the criteria. I am really interested in the files that are more than one day old.
What am I doing wrong?
Thanks
-rw-r--r-- 1 oracle dba 0 Jan 22 15:04 l0011623.tmp
-rw-r--r-- 1 oracle dba 0 Jan 24 06:31 l0011631.tmp
-rw-r--r-- 1 oradevl dba 0 Jan 24 06:14 l0011651.tmp
-rw-r--r-- 1 oradevl dba 0 Jan 24 08:50 l0011691.tmp
-rw-r--r-- 1 oracle dba 0 Jan 22 14:04 l0011852.tmp
-rw-r--r-- 1 oradevl dba 0 Jan 22 11:33 l0011853.tmp
-rw-r--r-- 1 oradevl dba 0 Jan 24 08:47 l0011873.tmp
-rw-r--r-- 1 oradevl dba 0 Jan 22 11:48 l0011875.tmp
-rw-r--r-- 1 oradevl dba 0 Jan 24 08:49 l0011877.tmp
-rw-r--r-- 1 oradevl dba 0 Jan 22 10:25 l0011878.tmp
-rw-r--r-- 1 oradevl dba 0 Jan 24 08:34 l0011879.tmp
-rw-r--r-- 1 oracle dba 0 Jan 24 06:49 l0011893.tmp
-rw-r--r-- 1 oracle dba 0 Jan 24 04:59 l0011894.tmp
-rw-r--r-- 1 oracle dba 0 Jan 22 14:34 l0011915.tmp
-rw-r--r-- 1 oracle dba 0 Jan 22 16:28 l0011918.tmp
-rw-r--r-- 1 oracle dba 0 Jan 22 15:34 l0011919.tmp
-rw-r--r-- 1 oracle dba 0 Jan 24 08:49 l0011921.tmp
-rw-r--r-- 1 oracle dba 0 Jan 22 15:04 o0011623.tmp
-rw-r--r-- 1 oracle dba 0 Jan 24 06:31 o0011631.tmp
-rw-r--r-- 1 oradevl dba 0 Jan 24 06:14 o0011651.tmp
-rw-r--r-- 1 oradevl dba 0 Jan 24 08:50 o0011691.tmp
-rw-r--r-- 1 oracle dba 0 Jan 22 14:04 o0011852.tmp
-rw-r--r-- 1 oradevl dba 0 Jan 22 11:33 o0011853.tmp
-rw-r--r-- 1 oradevl dba 0 Jan 24 08:47 o0011873.tmp
-rw-r--r-- 1 oradevl dba 0 Jan 22 11:48 o0011875.tmp
-rw-r--r-- 1 oradevl dba 0 Jan 24 08:49 o0011877.tmp
-rw-r--r-- 1 oradevl dba 0 Jan 22 10:25 o0011878.tmp
-rw-r--r-- 1 oradevl dba 0 Jan 24 08:34 o0011879.tmp
-rw-r--r-- 1 oracle dba 0 Jan 24 06:49 o0011893.tmp
-rw-r--r-- 1 oracle dba 0 Jan 24 04:59 o0011894.tmp
-rw-r--r-- 1 oracle dba 0 Jan 22 16:28 o0011918.tmp
-rw-r--r-- 1 oracle dba 0 Jan 22 15:34 o0011919.tmp
-rw-r--r-- 1 oracle dba 0 Jan 24 08:49 o0011921.tmp
Solved! Go to Solution.
- Tags:
- find
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2007 01:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2007 01:14 AM
01-24-2007 01:14 AM
Re: find -mtime +1 nor working
I think you mean:
# find . -name "o*.tmp" -mtime +1 -print
Thaqt is, add the '-name' and double quote the argument to it so that the shell does not interpret it too!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2007 01:16 AM
01-24-2007 01:16 AM
Re: find -mtime +1 nor working
I tried: find /var/tmp -name "o*.tmp" -mtime +1 -print but it stil finds no files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2007 01:32 AM
01-24-2007 01:32 AM
Re: find -mtime +1 nor working
What is the output of your command?
Please check date settings on your system.
What is the output of 'date' command?
rgds.
jaroslaw
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2007 01:40 AM
01-24-2007 01:40 AM
Re: find -mtime +1 nor working
and welcome to the forums !
Can you check you get something with:
ls -l o*.tmp
If not can you check with:
ls -lb *o*.tmp
The additional -b may reveal unprintable characters ( see "man ls" )
Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.
- Tags:
- unprintable chars
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2007 01:44 AM
01-24-2007 01:44 AM
Re: find -mtime +1 nor working
# date
Wed Jan 24 09:37:38 EST 2007
/var/tmp # find . -name "o*.tmp" -mtime +1 -print
The find command yields no output. Does the fact that the files have 0 bytes have any significance?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2007 01:47 AM
01-24-2007 01:47 AM
Re: find -mtime +1 nor working
What does:
# find /var/tmp -name "o*.tmp" -print
(no '-mtime' primary) return?
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2007 01:51 AM
01-24-2007 01:51 AM
Re: find -mtime +1 nor working
Using '-mtime +1' means that the age must be more than 1 (integer truncated) days old. Based upon the data you show, you probably want to use:
# find . -type f -name "o*.tmp" -mtime +0 -print
In fact, I prefer to create my own reference point (file) and do:
# touch -mt 01230948 #...about 24-hours ago my time...
# find . -type f -name "o*.tmp*" ! -newer /tmp/myref
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2007 02:54 AM
01-24-2007 02:54 AM
Re: find -mtime +1 nor working
worked. I did not realize the "truncated integer" part of the mtime command.
Thanks to all who took time out of their busy schedules to relpy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2007 03:00 AM
01-24-2007 03:00 AM