display the files in a folder which are older than 1 hour


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers display the files in a folder which are older than 1 hour
# 1  
Old 05-25-2007
display the files in a folder which are older than 1 hour

Hi,

I have some files in a folder with different time stamps and
I want to display the files which are older than 1 hour.

i tried with find.

need urgent help.
# 2  
Old 05-25-2007
find /path -name "*" -mtime -1

Last edited by as78; 05-25-2007 at 05:02 PM..
# 3  
Old 05-25-2007
One hour

Code:
#assume that now = 2007 05 25 17:15
touch -t tfile 200705251615  # one hour less

find /path/to/files -type f ! -newer tfile

# 4  
Old 05-25-2007
This thread is a (now closed) duplicate.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Hour display format

Hello Sir/Madam, I'm using Putty utility to run a shell script. I found HOUR display in two positions in UNIX. Is it possible to display in four positions? File name example: my file name is: HourlyData_20160708_1400.txt I'm in the process of comparing current date and time with the file... (15 Replies)
Discussion started by: V1l1h1
15 Replies

2. Shell Programming and Scripting

Command to find files older than 1 hour

Hi, Out of a list of files in a directory, I want to find the files which were created/modified more than 1 hour ago. I am using HP -UNIX and it does not support the argument -mmin. Please advise. I am using # !/bin/sh (4 Replies)
Discussion started by: jhilmil
4 Replies

3. UNIX for Dummies Questions & Answers

HP UNIX: How to find files which are older than one hour.

HP Unix Version: HP-UX B.11.31 U ia64 Question I look for script or command to find files which are older than one hour. Tried below; # set the file time to 1 hours ago touch -t 201307160700 ./touchfile find /app/grid/product/11.2.0.3/rdbms/audit -name '*.aud' -type f ! -newer... (4 Replies)
Discussion started by: Siva SQL
4 Replies

4. Shell Programming and Scripting

Script to delete files in a folder older than 2 days

hi i need a script to delete the files older than 2 days... if my input is say in a folder versions A_14122012.txt A_15122012.txt A_16122012.txt A_17122012.txt i want my output to be A_16122012.txt A_17122012.txt thanks in advance hemanth saikumar. (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies

5. UNIX for Dummies Questions & Answers

move files older than 2 days to another folder

Hi I am facing problem in using this command, mv `find /export/june/PURGEDATA*.txt -mtime +2 -exec ls {} \;` june/archive/ mv: Insufficient arguments (1) Usage: mv f1 f2 mv f1 ... fn d1 mv d1 d2 Thank you in advance (2 Replies)
Discussion started by: vishwakar
2 Replies

6. Shell Programming and Scripting

Script which erases files in Folder older than....

Hi! Need a script which erases files in folder /home/appl/backup which are older than 3 weeks... Any idea how to do that? I'm still investigating, but a little speed-up would be nice! ;-) Thanks! Michael (2 Replies)
Discussion started by: Michi21609
2 Replies

7. Shell Programming and Scripting

Deleting the contents of a folder older than X hours

Every day a new .zip file is uploaded to a folder and at mid-night the zip file is to be extracted into a /data/ folder, inside a date-named folder. # This should extract the contents of a zip file into the /data/ folder into a date based folder /usr/bin/unzip -a -o... (15 Replies)
Discussion started by: worchyld
15 Replies

8. Shell Programming and Scripting

BASH condition for "File older than 1 hour"

I have a monitor script that executes every 5 minutes. I am adding functionality that will detect if a previous execution is hung. I have managed to do that by using a flag that is created when the monitor starts and is then removed when the monitor finishes. The hang check simply looks to see if... (2 Replies)
Discussion started by: Squeakygoose
2 Replies

9. Shell Programming and Scripting

Find files older then today & display with timestamp info

Small query- I want to do some operation on all the files older then today. Before I do that operation, i want to verify if the command works properly or not. Surprisingly, the command below returns me file, which are created today - find /mrk_archive/PG/ftp/incomming/gbs/2008 -type f... (2 Replies)
Discussion started by: kedar.mehta
2 Replies

10. Shell Programming and Scripting

display the files in a folder which are older than 1 hour

Hi, I have some files in a folder with different time stamps and I want to display the files which are older than 1 hour. i tried with find. need urgent help. (7 Replies)
Discussion started by: vgs
7 Replies
Login or Register to Ask a Question