find and replace

Michael Havens bmike1 at gmail.com
Mon Feb 20 17:54:27 MST 2012


I'm trying to rename some files that have the extension JPG to jpg.

First thing I did was:

bmike1 at Michaels-Laptop ~/Pictures/2004 $ mv *JPG *jpg
mv: target `rosebud1.mod.jpg' is not a directory

huh? i want to move file x to file y! who said anything about a directory?

looked at the man page and tried it with  the T option:

bmike1 at Michaels-Laptop ~/Pictures/2004 $ mv -T *JPG *jpg
mv: extra operand `100_0046.JPG'

on the advice of others I tried:

bmike1 at Michaels-Laptop ~/Pictures/2004 $ rename JPG jpg *JPG
Bareword "JPG" not allowed while "strict subs" in use at (eval 1) line 1.

I tried

bmike1 at Michaels-Laptop ~/Pictures/2004 $ find *.JPG -exec rename .JPG .jpg
{} \;
syntax error at (eval 1) line 1, near "." <95 times>
bmike1 at Michaels-Laptop ~/Pictures/2004 $

and a few others. Why isn't mv moving a file name to another file name?
-- 
:-)~MIKE~(-:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20120220/3121b413/attachment.html>


More information about the PLUG-discuss mailing list