Re: Basic Bash/Find and batch CLI questions.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/listinfo/linux-audio-user




[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux