[Info-vax] Long uptime cut short by Hurricane Sandy

Simon Clubley clubley at remove_me.eisner.decus.org-Earth.UFP
Fri Feb 1 07:35:32 EST 2013


On 2013-02-01, Joseph Huber <joseph.huber at NOREPLY.web.de> wrote:
>
> Well: which Unix/Linux rename command ?
>
> on my Suses linux at home it is 
>   rename from to file...    
>   rename will rename the specified files by replacing the first occurrence
>   of from in their name by to. 
> on Ubuntu at work it is 
>    rename [ -v ] [ -n ] [ -f ] perlexpr [ files ]
>    example: rename 's/\.bak$//' *.bak
>
> I sometimes fall ovger the different syntax and functionality.
>
> BTW: the Ubuntu rename perl script works on VMS as well ! 
>    

Ubuntu is the odd one out here. The Suse syntax is also the syntax used
on RH based systems and has been present on my RH based systems for as
long as I can remember.

>From the man page on the RHEL clone box I am currently using:

-----------------------------------------------------------------------------
NAME
       rename - Rename files

SYNOPSIS
       rename from to file...

DESCRIPTION
       rename  will  rename  the specified files by replacing the first occur-
       rence of from in their name by to.

       For example, given the files foo1, ..., foo9, foo10, ...,  foo278,  the
       commands

              rename foo foo0 foo?
              rename foo foo0 foo??

       will turn them into foo001, ..., foo009, foo010, ..., foo278.

       And
              rename .htm .html *.htm

       will fix the extension of your html files.

SEE ALSO
       mmv(1), mv(1)

                                1 January 2000                       RENAME(1)
-----------------------------------------------------------------------------

Simon.

-- 
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world



More information about the Info-vax mailing list