On Fri, Jun 17, 2005 at 05:45:25PM -0700, Paul Johnson wrote:
> On Friday June 17 2005 12:19 pm, Aarre Laakso wrote:
> > Hello,
> >
> > I run Debian unstable. I noticed today that I don't have a 'rename'
> > command in /usr/bin anymore,
>
> I can't recall 'rename' being a command anywhere but MS-DOS. You
> probably meant 'mv'.
>
rename is certainly a command in *nix.
RENAME(1) Perl Programmers Reference Guide RENAME(1)
NAME
rename - renames multiple files
SYNOPSIS
rename [ -v ] [ -n ] [ -f ] perlexpr [ files ]
Of course, the difference between it and the lame MS-DOS version is that
you use a perl-compatible regexp to specify the rename scheme. Thus, if
you got and take 100 pictures with your digital camera and want to
change the default names (mine does something like DSCxxxx.JPG, where
the xxxx is one-up numbered), you specify:
rename 's/DSC/Birthday2005-/' *.JPG
It is really much nicer than manually renaming hundreds of files, which
I recall doing when I was an unfortunate Windows user.
-Roberto
--
Roberto C. Sanchez
http://familiasanchez.net/~sanchezr
Attachment:
pgpoUhgRdfodK.pgp
Description: PGP signature