Thursday, February 22, 2024
 Popular · Latest · Hot · Upcoming
rated 0 times [  39] [ 0]  / answers: 1 / hits: 16747  / 3 Years ago, sun, july 18, 2021, 12:01:31

I'm answering a question with a suggestion to use rename, and I realize I don't know what package it comes from (as part of the answer, I imagine saying something like "if you don't have rename, it's installed as part of [package]").

man rename tells me to SEE ALSO: mv(1), perl(1) - so my first thought is that it was installed with perl.

A related answer, how to tell what was installed as part of a package, helps me figure out that the perl package includes prename but not rename - and it turns out that my /usr/bin/rename points to /etc/alternatives/rename which points to /usr/bin/prename

So this is still kind of confusing. Did /etc/alternatives/rename point somewhere else before I installed perl? Is there a general way to tell which package something comes from?

More From » apt


install apt-file

$ sudo apt-get install apt-file

update apt-file

$ sudo apt-file update

search the package a file belongs to

$ apt-file search filename

find path of executable

$ whereis rename
rename: /usr/bin/rename.ul /usr/bin/rename /usr/bin/X11/rename.ul /usr/bin/X11/rename /usr/share/man/man1/rename.1.gz /usr/share/man/man2/rename.2.gz

search package

$ apt-file search /usr/bin/rename
ladr4-apps: /usr/bin/renamer
util-linux: /usr/bin/rename.ul

the package name is: util-linux

[#32623] Monday, July 19, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 178
Total Questions: 110
Total Answers: 98

Location: Lithuania
Member since Fri, Sep 4, 2020
4 Years ago