Spaces (and other characters) in filenames

Dotan Cohen dotancohen at gmail.com
Thu Aug 24 15:28:19 BST 2006


On 24/08/06, Gustav H Meyer <gustav at gcis.gov.za> wrote:
> Hi Dotan,
>
> On 23/08/2006 19:31, Dotan Cohen wrote:
> > Specifically, interacting with files through bash. I see that
> > I've asked quite a few questions on the subject in the past.
>
> What do you mean when you say interacting with files through bash?
> What are you trying to do?
>
> Most of the times there's no need to write a new script. For
> example: Have you ever seen the power of the find command combined
> with xargs?
>
> $ find . -type f -print0 |xargs -0 grep -li "mystring"
>
> The above mentioned command will find all files (including those
> with spaces) starting in the current directory and return only those
> that contain the word "mystring" (no matter the case).
>
> If you are serious about manipulating files you may want to consider
> something like perl.
>
> See also: $ man find2perl
>
> Regards,
> Gustav
>

Thanks, Gustav. I'm not that serious in the regard that I'm not about
to take a course. I'm just a regular home user, but I find that I
often want to do some 'advanced' things, like right now I need to
batch modify IPTC data in photographs. I will look into the commands
find and xargs. Thanks.

Dotan Cohen
http://lyricslist.com



More information about the kubuntu-users mailing list