Could you suggest how to use rename.ul
under Ubuntu 22.04 ? Many thanks !
Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.10.102.1-microsoft-standard-WSL2 x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
/etc/update-motd.d/50-landscape-sysinfo: 17: cannot create /var/lib/landscape/landscape-sysinfo.cache: Permission denied
System information as of Thu Aug 11 14:43:22 CST 2022
System load: 0.0 Processes: 15
Usage of /: 15.8% of 250.98GB Users logged in: 0
Memory usage: 0% IPv4 address for eth0: 172.25.114.46
Swap usage: 0%
0 updates can be applied immediately.
This message is shown once a day. To disable it please create the
/home/user/.hushlogin file.
user@localhost:~$ rename.ul
rename.ul: command not found
user@localhost:~$ sudo apt-get install util-linux
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
util-linux is already the newest version (2.37.2-4ubuntu3).
util-linux set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
user@localhost:~$ rename
Command 'rename' not found, but can be installed with:
sudo apt install rename
user@localhost:~$ rename.ul
rename.ul: command not found
user@localhost:~$
rename
(once upon a time, and maybe you tested that on a system where it is till so) what was calledrename.ul
was installed asrename
. But on ubuntu 22.04 it is not the case.rename
command cannot be used as you suggest (it takes a regex and a list of names. So your example wouldn't work. It should be used asrename s/abc/def/ *.txt
.) – chrslg Nov 30 '22 at 17:34rename
is as I've described here. – Chris Davies Nov 30 '22 at 17:53rename
(without UL. Which also existed in Ubuntu 20) is not the same. Try to click on Ubuntu 22 on your own source. You can't. Because thatrename.ul
has been removed. The remainingrename
, is not working as you described (and that is what bothers the OP. Who knows how to userename
but doesn't want to use it that way) – chrslg Nov 30 '22 at 17:58Bareword "abc" not allowed while "strict subs" in use at line 1, in:
. And also thatman rename.ul
gives "no entry", whileman rename
shows a man page very different from the one you linked:rename [...] [ -e|-E perlexpr]*|perlexpr [ files ]
. Besides, the removal of rename.ul has outraged more than one person, and it is a very well known fact that this command is no longer available on Ubuntu 22, and that therename
of Ubuntu 22 is not the same. – chrslg Nov 30 '22 at 18:01rename
is the (or "a") Perl-based one in all versions the package search knows, including 22.04: "jammy (22.04LTS) (perl): Perl extension for renaming multiple files [universe]". The Ubuntu search doesn't show me the package descriptions, but here's the one from Debian: "This package provides both a perl interface for renaming files (File::Rename) and a command line tool 'file-rename' [...]" – ilkkachu Nov 30 '22 at 21:14rename
command from File::Rename, as far as I can find one: https://metacpan.org/dist/File-Rename/view/rename.PL. It has the familiarrename 'perl code' filenames...
syntax, not the same as the util-linux one. – ilkkachu Nov 30 '22 at 21:17rename
package doesn't seem to be the solution. If theutil-linux
package doesn't install it any more, building the package from source and installing it manually would seem like a way. – ilkkachu Nov 30 '22 at 21:18