I have a project with many directories named proj
$ find . -iname proj
./include/proj
./src/proj
./lib/proj
./share/proj
./doc/proj
I want to rename all these directories to test with -exec mv. I came up with find . -iname proj -exec mv {} test but it doesn't work
find . -iname proj -print0 | xargs -0 rename.ul proj test– Costas Jul 20 '16 at 17:38find . -depth -type d -name proj -execdir mv proj test \;- you needdepthandexecdir- for details see Gilles' answer here... there's plenty of examples on this site, I just picked the first result in google – don_crissti Jul 20 '16 at 17:45find . -name proj -execdir mv {} test \;– Costas Jul 20 '16 at 17:51findwill still complain (No such file or directory), just usedepth– don_crissti Jul 20 '16 at 18:01