![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can I know find syntax to find given date files | bache_gowda | Shell Programming and Scripting | 3 | 03-26-2008 03:37 AM |
| Find duplicates from multuple files with 2 diff types of files | ricky007 | Shell Programming and Scripting | 2 | 03-04-2008 10:46 AM |
| Little bit weired : Find files in UNIX w/o using find or where command | jatin.jain | Shell Programming and Scripting | 10 | 09-19-2007 03:47 AM |
| how to find duplicate files with find ? | umen | Shell Programming and Scripting | 8 | 09-04-2006 12:01 AM |
| Find files older than 20 days & not use find | halo98 | Shell Programming and Scripting | 2 | 05-18-2006 11:19 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
gents
i need to look for a file with the latest date ... to make it clearer, here's what it looks like: /afc/data/EOD/Eoddev/Enqueue/Devices/Processed/060920212734/CDAuthorisedSet_0_7408.xml /afc/data/EOD/Eoddev/Enqueue/Devices/Processed/060920214314/CDAuthorisedSet_0_7409.xml /afc/data/EOD/Eoddev/Enqueue/Devices/Processed/060920220617/CDAuthorisedSet_0_7410.xml /afc/data/EOD/Eoddev/Enqueue/Devices/Processed/060920231041/CDAuthorisedSet_0_7411.xml /afc/data/EOD/Eoddev/Enqueue/Devices/Processed/060920232725/CDAuthorisedSet_0_7412.xml /afc/data/EOD/Eoddev/Enqueue/Devices/Processed/060921003333/CDAuthorisedSet_0_7413.xml now i need to find the latest CDAuthorisedSet_*.xml file ... how can i do that ... ive been trying to find out a solution but cant seem to find it .. here's my find command: find /afc/data/EOD/Eoddev/Enqueue/Devices/Processed -name "CDAuthorisedSet*" -type f -print this finds all the above files but who can i specify to use the one with the latest date .. thanks miles1982 |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
How about just
Code:
cd /afc/data/EOD/Eoddev/Enqueue/Devices/Processed; ls -lt CDAuthorisedSet*|head -1 |
|
#3
|
|||
|
|||
|
yes i figured it out ...
did the following: ls -l afc/data/EOD/Eoddev/Enqueue/Devices/Processed/*/CDAuthorisedSet_*.xml | tail -1; thanks anyway miles1982 |
|
#4
|
|||
|
|||
|
hi
Try this
path - -> path of the file age - -> how old file ur trying to retrive find ${path} -atime +${age} -exec ls -l {} \; |
|||
| Google The UNIX and Linux Forums |