|
|
Subject:
Using CP and XARGS on Windows to copy files within modified date range
Category: Computers > Programming Asked by: buddahlee-ga List Price: $40.00 |
Posted:
03 Jan 2006 12:20 PST
Expires: 05 Jan 2006 18:46 PST Question ID: 428559 |
|
There is no answer at this time. |
|
Subject:
Re: Using CP and XARGS on Windows to copy files within modified date range
From: m0hi1-ga on 05 Jan 2006 02:05 PST |
If you are trying to copy files from \\server1\f\directory1\ which are less than 2 days old to d:\archive\archive_directory then try one of this command. For 'for' of windows C:\backups>for /F %i IN ('find \\server1\f\directory1\*.* -mtime -2') DO cp %i d:\archive\archive_directory For 'for' of unix shell C:\backups>for i in `find \\server1\f\directory1\*.* -mtime -2`; do cp $i d:\archive\archive_directory; done |
Subject:
Re: Using CP and XARGS on Windows to copy files within modified date range
From: dazchambers-ga on 05 Jan 2006 04:22 PST |
Try specifying a target directory to cp: find \\server1\f\directory1\*.* -mtime -2 -print0 | xargs -n1 cp --target-directory=d:\archive\archive_directory The following worked under Linux: find . -mtime -2 -print0 | xargs -n1 cp --target-directory=/tmp/test |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |