Util-Linux

你能建議如何在 Ubuntu 22.04 下使用 rename.ul 嗎?非常感謝?

  • September 10, 2022

你能建議如何rename.ul在 Ubuntu 22.04 下使用嗎?非常感謝 !

   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.ul是從包中rename安裝的版本。util-linux如果它仍然存在,您將使用apt install util-linux. 但是,由於這個送出的錯誤util-linux: rename.ul is not installed 作為“rename”命令的可能替代方案,它似乎已從上游 Debian 軟體包版本 2.35.2-5 中刪除。

據我所知,包中提供的命令中提供了rename該功能(apt install rename``rename.ul``rename

man rename文件 ( )中給出了使用範例。這是我的看法,它在所有以 結尾的文件名中abc替換為:def``.txt

rename abc def *.txt

另見

引用自:https://unix.stackexchange.com/questions/716806