Find file with exact access date


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Find file with exact access date
# 1  
Old 10-22-2009
Find file with exact access date

Hi

I have to write command that find the files/dirs in the directory with access date equal to timestamp. ie or to be more precise I need to find files which are not equal to given timestamp

drwxr-xr-x 2 oracle oinstall 4096 May 31 2007 tmp

so need to have something like

find . * atime <> "2007/05/31 8:46:26" (this just an idea)

Thank you

Last edited by zam; 10-22-2009 at 09:26 PM..
# 2  
Old 10-23-2009
Have you searched this forum, we discussed a lot like this already, Anyway,

1. Create a dummy file using touch with specified time
Code:
touch -d "Fri Oct 23 08:40:39 IST 2009" /tmp/tt

2. find files newer than that,

Code:
find -anewer /tmp/tt

But how will you find older than that, let us see the other responses..
# 3  
Old 10-23-2009
Thanks a lot it's just what I am after !
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Does 'grep' update a file's access date/time?

I've got a job that finds and removes trace files based upon an access time of more than seven days (I've also tried a modify date). find TABC* -atime +7 -exec rm + find TABC* -mtime +7 -exec rm + Whether I use -atime or -mtime, the process seems to work sporadically. Sometimes it removes... (6 Replies)
Discussion started by: Scottie1954
6 Replies

2. Shell Programming and Scripting

Find: cannot access <file name>

Hi, I am getting below error in the log file: << 01/05/13 23:30:02 Script Start find: cannot access tu File name : 01/05/13 23:30:03 no input file found 01/05/13 23:30:03 Script End >> Below is the part of shell script which runs once in a week.It tries... (3 Replies)
Discussion started by: Ank13
3 Replies

3. Shell Programming and Scripting

echo exact xml tag from an exact file

Im stumped on this one. Id like to echo into a .txt file all names for an xml feed in a huge folder. Can that be done?? Id need to echo <name>This name</name> in client.xml files. $path="/mnt/windows/path" echo 'recording names' cd "$path" for names in $path than Im stuck on... (2 Replies)
Discussion started by: graphicsman
2 Replies

4. Shell Programming and Scripting

QUESTION1: grep only exact string. QUESTION2: find and replace only exact value with sed

QUESTION1: How do you grep only an exact string. I am using Solaris10 and do not have any GNU products installed. Contents of car.txt CAR1_KEY0 CAR1_KEY1 CAR2_KEY0 CAR2_KEY1 CAR1_KEY10 CURRENT COMMAND LINE: WHERE VARIABLE CAR_NUMBER=1 AND KEY_NUMBER=1 grep... (1 Reply)
Discussion started by: thibodc
1 Replies

5. UNIX for Dummies Questions & Answers

How to find a file if we dont know exact location of file ?

Hi I want know "How to find a file if we dont know exact location of file ?" Thanks, Tushar Joshi:) (9 Replies)
Discussion started by: tusharjoshi
9 Replies

6. UNIX for Advanced & Expert Users

Find exact path of a file/directory

Hello Folks, A wrapper takes an argument of file or directory name. I want to allow paths that reside within the current directory only. Can simply discard the paths like "/A" & "../" as they go outside the current by looking at the path beginning. How to validate this one: A/../../../b... (4 Replies)
Discussion started by: vibhor_agarwali
4 Replies

7. Shell Programming and Scripting

what is the find command to find exact dir from the root

I want to find a dir called STOP from the root.so what is the find command. Thanks & Regards Rajkumar (1 Reply)
Discussion started by: rajkumar_g
1 Replies

8. UNIX for Dummies Questions & Answers

How to find exact text in file ?

I have file named shortlist , and it contains this: 2233|charles harris |g.m. |sales |12/12/52| 90000 9876|bill johnson |director |production|03/12/50|130000 5678|robert dylan |d.g.m. |marketing |04/19/43| 85000 2365|john woodcock |director |personnel... (1 Reply)
Discussion started by: Cecko
1 Replies

9. Shell Programming and Scripting

Find Exact word in file

Hi ALL, I want to search one string “20 “ i.e 20 with space. But my file where I am searching this “20 “ contain some data like 120 before image file truncated 220 Reports section succeeded 20 Transaction database .prd stopped 220 Reports section completed. When I search for the... (5 Replies)
Discussion started by: Jeevan Salunke
5 Replies

10. Shell Programming and Scripting

how to find the exact pattern from a file?

Hi Let say there is a file a.txt which contain number rows. My intention is to find the number of occurences of a pattern. Let say the pattern is mdbase. then it should not count the occurences of mdbase1 or mdbase2 like this. When I tried to find it like grep "/backup/surjya/mdbase"... (7 Replies)
Discussion started by: surjyap
7 Replies
Login or Register to Ask a Question