|
|
command [message #296847 is a reply to message #296841] |
Tue, 29 January 2008 04:55 |
rajesh_hv
Messages: 13 Registered: January 2008 Location: bangalore
|
Junior Member |
|
|
hi.,
Using find with the -exec flag is a convenient way to copy, move, print, and even delete groups of files that may be scattered across many different directories. A word of caution, though: If you're going to apply some potentially dangerous command (like rm) to your files, use the -ok flag instead of -exec. It works the same way, except it prompts you to confirm each command before executing it. Here's an example:
find . -name "*.txt" -ok mv {} junkdir \;
mv sample1.txt junkdir ok? (y/n)
mv sample2.txt junkdir ok? (y/n)
|
|
|