The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need to get 4 Hrs back time and compare with successive time maanik85 UNIX for Dummies Questions & Answers 2 07-15-2008 08:48 AM
Compare file time pdr302 Shell Programming and Scripting 1 11-01-2007 06:14 PM
Compare Date And Time Jamil Qadir UNIX for Dummies Questions & Answers 5 01-10-2007 10:22 AM
compare update time of files dorilevy UNIX for Dummies Questions & Answers 8 05-27-2003 09:48 AM
compare files acess time AkumaTay UNIX for Dummies Questions & Answers 2 05-19-2002 03:02 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-04-2008
Registered User
 

Join Date: Sep 2008
Posts: 27
Question Can we compare time ...

Hi ...

Is there a possibility that timings from two files be compared??

If i have a set of files in a folder and i want to get the files only upto a particular time.
eg:
If i have the files

staff 2388 Oct 3 04:33 x.ksh
staff 3628 Oct 3 06:57 1.ksh
staff 32383 Oct 3 06:57 files
staff 280365 Oct 3 06:57 bakup
staff 140770 Oct 3 20:54 satsub1
staff 123000 Oct 3 20:58 satsub2

I want the list of files which are present before or equal to time 20:54

Is that possible with time???

thanks,
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-04-2008
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 5,214
Code:
touch -t 200810032054 dummy
find /path/to/files -type f ! -newer dummy -exec ls -l {} \;
rm -f dummy
put a timestamp on a dummy file, use that file with ! -newer - meaning "not" newer or older in a find command. If you have a file already has the correct timestamp you do not need to touch a dummy file
Reply With Quote
Google The UNIX and Linux Forums
Reply

Bookmarks

Tags
None

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:




All times are GMT -4. The time now is 07:27 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66