Re: The rename command…
- From: "Johnny Rosenberg" <gurus.knugum@xxxxxxxxx>
- Date: Wed, 27 Aug 2008 21:46:24 +0200
2008/8/27 Rashkae <ubuntu@xxxxxxxxxxxxxxx>
Johnny Rosenberg wrote:When looking around on the web, I've seen a few sites where they mention the
thinkWhen 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
they used mv instead, but I can't find it.something,
Is there a reason not to use rename (such as it might be slow or
maybe even incompatibility with non-Debian based systems)? I realise thatI
need regular expressions to achieve the name change, which makes renamethe
convenient choice, but there should be other ways, shouldn't it?found
Unfortunately I never bookmarked the site where I found it (or THINK I
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.
"other" rename, but no one seems to use it very much. One person even
mentioned it as "pretty useless" or something like that…
I don't know very much about Perl, almost nothing at all, but isn't Perl a
programming language that doesn't use a compiler? Maybe I misunderstood, but
isn't the Perl rename thing written in Perl? If so, shouldn't that mean that
rename is quite a lot slower than it would be if it was written in, for
example, C, like I think the rest of the Unix/GNU/Linux commands are, such
as mv?
That's why I asked for a solution without involving rename at all. Not that
it matters if renaming a few hundred files recursively in a folder with, in
my case about 21500 objects (files, links and folders), but I always think
that if I can make something faster, I should, at least if it doesn't take
too much time… In this case I learn something on the way, which I take as a
valuable bonus.
J.R.
--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
- Follow-Ups:
- Re: The rename command…
- From: Ulf Rompe
- Re: The rename command…
- From: Rashkae
- Re: The rename command…
- From: Marcin 'Qrczak' Kowalczyk
- Re: The rename command…
- References:
- The rename command…
- From: Johnny Rosenberg
- Re: The rename command…
- From: Ulf Rompe
- Re: The rename command…
- From: Johnny Rosenberg
- Re: The rename command…
- From: Johnny Rosenberg
- Re: The rename command…
- From: Rashkae
- Re: The rename command…
- From: Johnny Rosenberg
- Re: The rename command…
- From: Johnny Rosenberg
- Re: The rename command…
- From: Rashkae
- The rename command…
- Prev by Date: Re: network drives
- Next by Date: Re: The rename command…
- Previous by thread: Re: The rename command…
- Next by thread: Re: The rename command…
- Index(es):
Relevant Pages
|