mv xrags and cp

OOzy Pal oozypal at gmail.com
Fri Jan 19 12:14:58 UTC 2007


On 1/19/07, Florian Diesch <diesch at spamfence.net> wrote:
> John Dangler <jdangler at atlantic.net> wrote:
>
> >>
> >> This command is good
> >>  find olddir -name '*.jpg' -exec cp {} newdir/ \;
> >>
> >> how can I make the above command rename the file in the format of
> >>
> >> date +%s%N.jpg
> >>
> >> to make sure that each file gets a unique name?
> >>
> > write a shell script around the command like...
> > for word in `find olddir -name '*.jpg'
> > do
> > ... copy command
> > done
>
> This will fail if there are filenames containing whitespaces.
>
>
>
>    Florian
> --
> <http://www.florian-diesch.de/>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
Thank you, no whitespaces. But what if there is? Is there a solution.

-- 
OOzy
Kubuntu-Edgy




More information about the ubuntu-users mailing list