The rename command…

Rashkae ubuntu at tigershaunt.com
Wed Aug 27 16:42:25 UTC 2008


Johnny Rosenberg wrote:

>>
> When I was searching for a solution to my problem (which I now consider
> solved) I think I ran into a solution without the rename command… I think
> they used mv instead, but I can't find it.
> 
> Is there a reason not to use rename (such as it might be slow or something,
> maybe even incompatibility with non-Debian based systems)? I realise that I
> need regular expressions to achieve the name change, which makes rename the
> convenient choice, but there should be other ways, shouldn't it?
> 
> Unfortunately I never bookmarked the site where I found it (or THINK I found
> it…).
> 
> J.R.
> 

There is a standard linux rename command.  Unfortunately, Debian
replaces it with the Perl "prename".  This is problematic because the
syntax between standard linux rename and prename is very different, and
therefore you can't write a script with rename that will work with
default debian distros and other distros.  (you can search this list for
a recent long discussion I had with myself on the subject of rename)

ps: well, that's not technically true.  You could write a script that
checks for the appropriate command and sets it as a variable, that would
work across distors, but I think you get my point.




More information about the ubuntu-users mailing list