Just a note on the -exec parameter of
find:
It is really simple once you get the hang of it:
specify the
find command line like you would do normally, for example:
find . -name \*.mp3 -type f
to find all files in or below the current directory that are name *.mp3
Now, append
-exec to it, followed by the full commandline you want to execute. Replace any occurence of the filename that will be passed to it with
\{\}, for example:
find . -name \*.mp3 -type f -exec mv \{\} test/\{\}
Finally, append
\; to it.
find . -name \*.mp3 -type f -exec mv \{\} test/\{\} \;
Done.
The commandline for your
for i in `find $1 -name '*.flac' -print` ; do \
echo $i; done
would look like this:
find $1 -name '*.flac' -exec echo \{\} \;
cu,
sven