recursively changing chars in filenames
Smoot Carl-Mitchell
smoot at tic.com
Sun Jun 28 14:34:30 UTC 2009
On Sun, 2009-06-28 at 21:03 +1200, Tim Frost wrote:
> > You could stick it in "find" and have find do the recursion.
> >
> > find . -type d -exec your_script {} \;
>
> This will break for directories that are renamed, because the script
> will rename directories before they have been examined. By adding the
> '-depth' option, you tell the find command to use 'depth-first' - i.e.
> to process the contents of a directory before it processes the
> directory.
Good point. I missed the fact he is also renaming directories.
> So Soren can run
> find . -depth -type d -exec your_script "{}" \;
> after remembering to quote the parameter $1 in the script.
--
Smoot Carl-Mitchell
Computer Systems and
Network Consultant
smoot at tic.com
+1 480 922 7313
cell: +1 602 421 9005
More information about the ubuntu-users
mailing list