Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

bash: rename: command not found

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
Waldo Jeffers
Posts: 52
Joined: 2021-12-30 19:38
Has thanked: 1 time
Been thanked: 2 times

bash: rename: command not found

#1 Post by Waldo Jeffers »

This neat cli can cut unwanted txt from file names. Like:

Code: Select all

rename 's/the very best of//' *
Works a treat in Mint.
But on Debian it doesn't. :(

Code: Select all

bash: rename: command not found
How get it working?
Waldo Jeffers has reached his limits.

User avatar
canci
Global Moderator
Global Moderator
Posts: 2502
Joined: 2006-09-24 11:28
Has thanked: 136 times
Been thanked: 136 times

Re: bash: rename: command not found

#2 Post by canci »

It's odd to me that you can obviously use intermediate level commands, but are somehow unable to just search for packages yourself.

I think your rename command might be this:

Code: Select all

$  apt show rename

Package: rename
Version: 1.13-1
Priority: optional
Section: perl
Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
Installed-Size: 51.2 kB
Provides: libfile-rename-perl
Depends: perl:any, perl (>= 5.26.0-6)
Recommends: libio-stringy-perl, libpod-parser-perl
Conflicts: libfile-rename-perl
Breaks: perl (<< 5.26.0-6)
Replaces: libfile-rename-perl, perl (<< 5.26.0-6)
Homepage: https://metacpan.org/release/File-Rename
Download-Size: 18.0 kB
APT-Sources: http://deb.debian.org/debian bullseye/main amd64 Packages
Description: Perl extension for renaming multiple files
 This package provides both a perl interface for renaming files
 (File::Rename) and a command line tool 'rename' which is intended to
 replace the version that used to be supplied by the perl package.
Here's a nice primer of what the Debian community usually expects you to do when you're at a certain level of knowledge (and I know you are, since a total beginner wouldn't be using rename with regex otherwise):

viewtopic.php?t=47078
Image Stable / Asus VivoBook X421DA / AMD Ryzen 7 3700U / Radeon Vega Mobile Gfx (Picasso) / 8 GB RAM / 512GB NVMe

READ THIS:

* How to Post a Thread Here
* Other Tips and Great Resources

Waldo Jeffers
Posts: 52
Joined: 2021-12-30 19:38
Has thanked: 1 time
Been thanked: 2 times

Re: bash: rename: command not found

#3 Post by Waldo Jeffers »

Dear canci, being able to do some copy/ pasting doesn't mean you've reached a certain knowledge. :(
Waldo Jeffers has reached his limits.

Waldo Jeffers
Posts: 52
Joined: 2021-12-30 19:38
Has thanked: 1 time
Been thanked: 2 times

Re: bash: rename: command not found

#4 Post by Waldo Jeffers »

Code: Select all

apt show rename
results

Code: Select all

Package: rename
Version: 1.13-1
Priority: optional
Section: perl
Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
Installed-Size: 51.2 kB
Provides: libfile-rename-perl
Depends: perl:any, perl (>= 5.26.0-6)
Recommends: libio-stringy-perl, libpod-parser-perl
Conflicts: libfile-rename-perl
Breaks: perl (<< 5.26.0-6)
Replaces: libfile-rename-perl, perl (<< 5.26.0-6)
Homepage: https://metacpan.org/release/File-Rename
Download-Size: 18.0 kB
APT-Sources: http://ftp.uk.debian.org/debian bullseye/main amd64 Packages
Description: Perl extension for renaming multiple files
 This package provides both a perl interface for renaming files
 (File::Rename) and a command line tool 'rename' which is intended to
 replace the version that used to be supplied by the perl package.
Then

Code: Select all

rename 's/the very best of//' *
results in

Code: Select all

-bash: rename: command not found
Waldo Jeffers has reached his limits.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: bash: rename: command not found

#5 Post by p.H »

If the package is not installed, you must install it.

Code: Select all

apt install rename
.

Waldo Jeffers
Posts: 52
Joined: 2021-12-30 19:38
Has thanked: 1 time
Been thanked: 2 times

Re: bash: rename: command not found

#6 Post by Waldo Jeffers »

@p.H That helped.
Waldo Jeffers has reached his limits.

Post Reply