Erman Arslan's Oracle Forum
›
Linux
Search
everywhere
only in this topic
Advanced Search
AIX script
Classic
List
Threaded
♦
♦
Locked
5 messages
Roshan
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
AIX script
Hi,
I want to copy files older than 1 day from 1 folder to another. I have a script
find /home/test/*.gz -mtime -1 -exec cp {} targetdir \;
it does not work on aix
Please advise.
Regards,
Roshan
ErmanArslansOracleBlog
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: AIX script
Administrator
I have no AIX currently, so test the below command yourself; (in a test system first)
find /search_dir -name "*.txt" | xargs -t -I {} cp -p {} {} /dest_dir/
Roshan
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: AIX script
The script is working. But where should I specify the time?
Roshan
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: AIX script
I have tested it with
find /archicom/data/arch/chrg/MMS/*gz -mtime +0 -mtime -2 -exec cp {} /u01/migrationprod \;
it works
Thanks
ErmanArslansOracleBlog
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: AIX script
Administrator
Good Roshan..
Free forum by Nabble
Edit this page