|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
ls -?????
Looking for a way to list (ls) based on mod/create date. The closest I’ve come is something like (ls –ltr). This of course returns all files in a given directory. If anyone is familiar with VMS it would be equivalent to (dir/sin). I’m trying to incorporate this into a ftp script that deals with exact reoccurring file names.
|
|
#2
|
|||
|
|||
|
You want find
Suppose you want everything from Sep 1 on ... use touch Code:
touch -t 200409010001 t.file find /path./to/file -newer t.file This finds files with a mod date newer than t.file And - NB there is no create date in Unix only: 1. last access 2. last modify 3. last inode change (permissions change, ownership change etc on file) |
|
#3
|
|||
|
|||
|
Quote:
That actually works great however the question is a little deeper and involves more FTP logic. I've actually created a script containing your suggestions and aliased it to a new command within my environment. It works great. I'm going to try and include my code for future forum reference. Feel free to pick it apart. |
|
#4
|
|||
|
|||
|
That script does a (in VMS like terms) DIR/SINCE=START_OF_THIS_MONTH.
You may want something more flexible: try www.unix.com - there are some "FAQ" tutorials one on the find command. one on date arithmetic: http://www.unix.com/showthread.php?s=&threadid=13863 http://www.unix.com/showthread.php?s=&threadid=13785 |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > ls -????? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|