[kwlug-disc] bash - file renaming
Remi Gauvin
remi at georgianit.com
Thu Sep 26 10:07:49 EDT 2019
On 2019-09-26 4:00 a.m., Ronald Barnes wrote:
>
> Hi everyone,
>
> As you probably already know, Gnu/Linux distributions do not come with a
> rename utility similar to what some of us "grew up on" in DOS and/or OS/2.
>
> The "mv" (move) command is to be used instead. But it doesn't handle
> things like "mv *.htm *.html".
>
A quick appology, I do not mean to derail the discussion of your new
utility, which might have great functionality. But this is not the
first time I find veterans who are completely unaware of the Linux
rename command.
Linux does, actually, have a rename command. It has two of them. (One
that comes in the standard set of 'util-linux' packages, and another
more powerful regex powered one that Debian, (and ubuntu) use instead.
The util-linux rename is therefore called rename.ul on those distros.)
In your example, this would have been done with
rename.ul .htm .html *.htm
(Ironically, this is the exact example in the rename.ul man page.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20190926/ac88cd84/attachment.sig>
More information about the kwlug-disc
mailing list