scp files that are 3 days older from remote server-

hello,
i am trying to get a list of files to be scped from the remote server
by running the below in my local unix server ( note - there is a passwordless connectivity setup made between the local and remote server) and, we use KSH.
---

ssh $scp_host "find /a/b/c/*/ -iname "$remote_file""  > list.dat

the above pulls all the files that matches the pattern from remote server...but i wanted to pull only the files that are 3 days old from the remote server. how coud i achieve it using the above syntax.

Say today is Dec 8. If by three days ago you mean all find files dated Dec 5 (ls -l output )
then try:

ssh $scp_host "find /a/b/c/*/ -type f -iname "$remote_file" -ls "  | 
              grep 'Dec 5' | awk '{printf $(NF) }'  > list.dat

Depending on your find version you have quite some date/time evaluation tests (a/c/mtime, newer, a/c/mmin,...) at your disposal, cf. find man page.

jim mcnamara,

in the case you mentioned, i wanted to pull all files from Dec 5th to as of Dec 8th (say current date is Dec 8th) ..i dont need just the Dec5th.

kindly advise me the syntax for the same -

for example, with below command, you can search the files older than 3 days. (with modify time)

find . -type f -iname "$remote_file" -mtime +3