Using rename, and cp to rename a file.

Brian McKee brian.mckee at
Wed Feb 24 05:04:06 UTC 2010

On Tue, Feb 23, 2010 at 11:11 PM, Ray Parrish <crp at> wrote:
> Hello,
> I get the following -
> ray at RaysComputer:~/logs/IIS$ rename /home/ray/logs/IIS/Grapg.html Graph.html
> Bareword found where operator expected at (eval 1) line 1, near "/home/ray"
>    (Missing operator before ray?)
> syntax error at (eval 1) line 1, near "/home/ray"

try 'man rename' for more info.  It isn't what you think it is....
The error messages look funny to you because it's a perl script.

To change the name of a single file - use mv - e.g. mv Grapg.html Graph.html

To change a bunch of files names in a pattern, use rename - e.g.
rename 's/html/htm/g' *.html  would rename all your .html files to .htm

Hey, it's your computer.... isn't it?

More information about the ubuntu-users mailing list