您能建议如何在 Ubuntu 22.04 下使用 `rename.ul` 吗?非常感谢?

SOU*_*ser 2 util-linux

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:~$
Run Code Online (Sandbox Code Playgroud)

roa*_*ima 5

rename.ulrename是从包中安装的版本util-linux。如果它仍然存在,您将安装它apt install util-linux。然而,它已从上游 Debian 软件包版本 2.35.2-5 中删除,似乎是因为提交的错误util-linux: rename.ul is notinstalled 作为“rename”命令的可能替代方案

据我所知,该功能在rename包(apt install rename)中提供的命令中可用,如果您确实需要rename.ul作为与此不同的命令rename,则必须从其他来源安装它。

文档 ( man rename) 中给出了使用示例。这是我的看法,它将替换abc所有def以 结尾的文件名.txt

rename abc def *.txt
Run Code Online (Sandbox Code Playgroud)

另请参阅