[LAU] Basic Bash/Find and batch CLI questions.
Clemens Ladisch
clemens at ladisch.de
Sun Mar 23 12:59:54 UTC 2014
Kaza Kore wrote:
> find ./ -type d -exec ~/bin/flac2mp3 "{}" \;
>
> So find is passing all directories, via the type argument
The type argument is a filter.
> find is not actually being used for any searching, just to recursively send all folders, right?
The default action is to print what has been found.
With -exec, the specified program is executed for each found item.
> I don't understand the bit after the exec call
{} is the file name, ; ends the command to be executed.
> $ find -iname *wey*
> find: paths must precede expression: weyheyhey !! - Little Batty Foo Foo (ft. TechDiff's Modest Loft Conversion remix).mp3
The shell expands *wey* into multiple arguments, but -iname expects only one.
It worked in the parent directory because *wey* could not be expanded there.
To prevent expansion, quote it:
$ find . -iname '*wey*'
Regards,
Clemens
More information about the Linux-audio-user
mailing list