Need Help in Finding Files ::

Hi All ,

i am in progress of creating a script which should find a file a.txt , in a particular root directory . This should actually Search all the Sub directories and copy those files and FTP it to a server . Need a Input how to Proceed on this

Thankyou guys

find . -name *.txt|xargs -i rcp {} username@serverhost:/dir_server

thanks

If i donot have a Rcp enabled , is there a way to copy through FTP ???

Hi

Just to add on , i need to find all the a.txt from all the directories with the timestamp that it got created ..

Lets say the file got created oct10th 2008 then the file should be renamed to a.txt_20081010 and copied to another directory ..

Can you please help me on this

This would help with the date naming part

stat -c %y FILENAME.TXT | cut -d" " -f1 | tr -d "-"
20081124

Thanks for your reply , I am still having some issues .

I am able to find the files find . -name *.txt but i am not able to copy them into some other directory from there i need to FTP to a server (file server)

also since these file name have same names we need to segregate with the TIme stamps .. i know some one should be some answer for this .. Please do Post it

Thanks!!

find . -name "hqr*" -type f -print -exec cp "hqr*" test1

i tried the above command and it doesnot work , how can i copy these files one i found those files . T
Thanks again for your help