Searching files by last accessed time


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Searching files by last accessed time
# 1  
Old 11-23-2007
Searching files by last accessed time

How can I search for files by last accessed time? I want to see files accessed in the last 24 hours, for example...or even less time, maybe in the last 3 hours?

Thank you in advance,

Trellot
# 2  
Old 11-23-2007
find . -atime n*24 hrs ago
# 3  
Old 11-23-2007
Quote:
Originally Posted by pbsrinivas
find . -atime n*24 hrs ago
I'm getting the following message:

find: invalid argument `n*24' to `-atime'

Something I've done wrong here?

Trellot
# 4  
Old 11-23-2007
"find . -atime -2" means find files accessed within the last 2 days.
# 5  
Old 11-23-2007
man find

You will find explanations for time switches such as these in bash:
-amin n
-anewer file
-atime n
-cmin n
-cnewer file
-ctime n
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Record top accessed processes/files

Hello, I have about 100 servers that I'm looking to collect information regarding top files and processes accessed within a 168 hr (1 week) period. Each server has a different purpose and so different installed applications. All servers are running either unix or linux. What would be a... (0 Replies)
Discussion started by: umang2382
0 Replies

2. UNIX for Advanced & Expert Users

Track the files accessed by a script.

How can i track all the files accessed by script. The script is supposed to bring up my application and this script is just the main script which inturn calls another scripts and executable. I need to know all the the files this main script calls and the files accessed by all the other scripts... (2 Replies)
Discussion started by: chacko193
2 Replies

3. Shell Programming and Scripting

Searching the lines within a range of time period in a text file

Dear All, Please advice me, I have a text file with one field date and time like below given. I need to find out the lines whchi content the time stamp between Wed May 26 11:03:11 2010 and Wed May 26 11:03:52 2010 both can be included, using awk command which could be an interactive so that I... (6 Replies)
Discussion started by: chinmayadalai
6 Replies

4. Shell Programming and Scripting

Last Accessed Time Script

Hi I want a shell script that will give me a list of files which were last accessed over a specific time ago and want it to use a variable so I can do this... Rought Example... #Input time in bracket for how many months. MONTHSAGO="13" #Specify the Top Level Directory path you want to ... (6 Replies)
Discussion started by: digitaljunkie
6 Replies

5. Shell Programming and Scripting

Searching for Gaps in Time

I am very new to shell scripting. We use C-Shell here and I know the issues that surround it. I hope a solution can be created using awk, sed, etc... instead of having to write a program. I have an input file that is sorted by date and time in ascending order ... (2 Replies)
Discussion started by: jclanc8
2 Replies

6. UNIX for Advanced & Expert Users

Monitor files being copied/accessed

Hello, Is there a way (without 3rd party software) to know if a file has been accessed and/or copied ? I'm interested in any solution : doing command line instructions , running background scripts etc... I apologize if I posted this in the wrong forum. Thank you! (8 Replies)
Discussion started by: prostiiinet
8 Replies

7. UNIX for Dummies Questions & Answers

Number of files accessed this week

I have looked around on the internet and still i am no wiser as to how to show the number of files in a directory that have been accessed this week and also that as a percentage. Any help would be much appreciated. (5 Replies)
Discussion started by: RAFC_99
5 Replies

8. Shell Programming and Scripting

searching between start and end time

Hello All, Below mentioned is my log file. I want to make a script which ask for start time and then end time and then search particular word between those lines. Like start time:2 end time: 4 and then search all values starting from cell 84 between this time. Please Help ... (2 Replies)
Discussion started by: wakhan
2 Replies

9. Shell Programming and Scripting

Find files not accessed on a remote server and delete - Help!

Hi Guys, I am currently working on a script to find all the files that have not been accessed for the past 2 years. This, i guess has been discussed n number of times in this forum. Now, my requirement is to find all the files in the remote windows server. I have it mounted in unix. I was... (1 Reply)
Discussion started by: bond_bhai
1 Replies

10. Shell Programming and Scripting

getting last accessed and modified time together

actually, i'm making an Intrusion Detection System for education purpose (for project) using Bourne shell. The problem I get in that is:- 1. My application should check if there's some modification or alteration in the directory. 2, For that thing, I need to have every attribute of file and... (1 Reply)
Discussion started by: raku05
1 Replies
Login or Register to Ask a Question