need to move several directories
I have the current directory structure in /tmp:
utilityserver/REPLACE_COMPUTER_NAME/properties/ guiserver/REPLACE_COMPUTER_NAME/properties/ newserver/REPLACE_COMPUTER_NAME/properties/ (and so on - more directories with the same structure) From /tmp, I would to rename the above directories as follows: utilityserver/server1/properties/ guiserver/server1/properties/ newserver/server1/properties/ (and so on) Is there a find -exec option that will do this? If not, what is the easiest way to do this? |
There might be a better way to do it, but you can run multiple commands from -exec if you run 'sh -c "...Your commands here...'.
So for example, you could have something like this (untested): Code:
find . [how to identify directories] -exec sh -C 'olddir={};\ |
this worked - small revision
This worked beautifully with one small correction. Make the -C should be -c (lowercase). Thanks for the help.
Code:
find . [how to identify directories] -exec sh -c 'olddir={};\ Quote:
|
Quote:
|
All times are GMT -5. The time now is 04:15 PM. |