I want to find all directories with the last subdirectory named doc, for then rename them to Doc. How can be renamed?
I've the first part:
find -type d -name 'doc'
which returns directories paths like:
./foo/bar/doc
|
||||
|
|
|
In zsh, you can use the
If you have non-directories called
|
|||
|
|
|
If your intention is to capitalize the directory and you're using
Note the use of UpdateAs jw013 points out in the comments Btw, thanks rush for adding the missing pipe. |
|||||||||||||
|
renameworks for you by all means use it. The trouble is there is no standardrename(1)command, so unless you tell everyone your version ofrenamewe can't really help you with that approach. – jw013 Jul 25 '12 at 13:27