mtime unexpected behaviour


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers mtime unexpected behaviour
# 8  
Old 05-28-2012
Please post what Operating System and version you are running. There is much variation in the find command.

Please post sample full hierarchial names of a few sample files so we can work out which part is the directory and which part is the name of the file. Do you really have filenames containing < and > characters?
# 9  
Old 06-01-2012
Quote:
Originally Posted by harris
Hi Vryali,
i executed the find command individually like
Code:
find -H /abc/archive/filename_*.dat -type f -mtime +61

Your understanding of find is a bit off:

Code:
find -H <root directory> -type <type> -mtime <time>

You're wanting to add a filter to find things that match filename_*.dat, and the most OS friendly way to do that would be with -name and it be case sensitive...

Code:
find -H /abs/archive/ -name 'filename_*.dat' -type f -mtime +61

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

[BASH] Getopts/shift within a function, unexpected behaviour

Hello Gurus :) I'm "currently" (for the last ~2weeks) writing a script to build ffmpeg with some features from scratch. This said, there are quite a few features, libs, to be downloaded, compiled and installed, so figured, writing functions for some default tasks might help. Specialy since... (3 Replies)
Discussion started by: sea
3 Replies

2. UNIX for Dummies Questions & Answers

Unexpected Behaviour from grepping Text File

Hi! I recently downloaded a wordlist file called 2of12.txt, which is a wordlist of common words, part of the 12dicts package. I've been getting unexpected results from grepping it, such as getting no matches when clearly there ought to be, or returns that are simply wrong. Par exemple: egrep... (4 Replies)
Discussion started by: sudon't
4 Replies

3. AIX

Unexpected Behaviour with WPAR

Hello, We have a system running AIX 6.1.7.1. We have created a Workload Partition(wpar) on this system with wpar specific routing enabled. On wpar, we are running DNS (UDP/53) and syslog (UDP/514). en0: 1.1.1.1/255.255.255.0 NOT assigned to any wpar en1:... (0 Replies)
Discussion started by: 03sep2011
0 Replies

4. Shell Programming and Scripting

Find by name and mtime

Hi, I'm trying to find all files that have a .ksh and .p extension and that are 7 days old by using the below find command but it doesn't seem to as expected. It gives me random results.. Can someone point out what may be wrong? find . -name "*.ksh" -o -name "*.p" -mtime -7 (2 Replies)
Discussion started by: Jazmania
2 Replies

5. UNIX for Dummies Questions & Answers

(find) mtime vs. (unix) mtime

Hi I've made some test with perl script to learn more about mtime... So, my question is : Why the mtime from findfind /usr/local/sbin -ctime -1 -mtime -1 \( -name "*.log" -o -name "*.gz" \) -print are not the same as mtime from unix/linux in ls -ltr or in stat() function in perl : stat -... (2 Replies)
Discussion started by: hiddenshadow
2 Replies

6. Shell Programming and Scripting

mtime

Hi, I've some files of some past days and everyday some new files are also getting added to the same. Now how can i use mtime to get the files of the current date i.e if i want the files of 25th feb 2009 and if im finding the files on 25th 12:10 am then i should only get the files after... (4 Replies)
Discussion started by: ss_ss
4 Replies

7. UNIX for Dummies Questions & Answers

-mtime +30

Hello, Can someone help me to understand the following: find /test/rman/ -mtime +30 -exec rm '{}' \; What does -mtime +30 mean? Thanks! (1 Reply)
Discussion started by: Blue68
1 Replies

8. Shell Programming and Scripting

mtime

hi, :) consider the following statement find . -type f -mtime -1 -print here what is the use of -1 option. any help? cheers RRK (7 Replies)
Discussion started by: ravi raj kumar
7 Replies

9. UNIX for Dummies Questions & Answers

mtime help!!!!!

thank you for the help. (2 Replies)
Discussion started by: scooter17
2 Replies

10. UNIX for Dummies Questions & Answers

find . -mtime

...what am i doing wrong?? I need to find all files older than 30 days and delete but I can't get it to pull details for ANY + times. The file below has a time stamp which is older than 1 day, however if I try and select it using any of the -time flags it just doesn't see it. (the same thing... (1 Reply)
Discussion started by: topcat8
1 Replies
Login or Register to Ask a Question