Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

50%
+0 −0
Q&A How to identify and separate standalone applications from libraries in Linux package lists?

This answer is not directly usable under Arch, since I don't know the tools there. I show you a way to do it on Debian, which may inspire you to find a similar way in Arch. With apt-file(1), you ...

posted 7mo ago by alx‭  ·  edited 7mo ago by alx‭

Answer
#8: Post edited by user avatar alx‭ · 2023-10-10T11:24:28Z (7 months ago)
  • This answer is not directly usable under Arch, since I don't know the tools there. I show you a way to do it on Debian, which may inspire you to find a similar way in Arch.
  • With *apt-file*(1), you can list the files that a package provides. From that list, you can see if the package provides files in `/usr/bin/` or in `/usr/lib/`. It's not a perfect approach, since it may provide files in both, in which case you're on your own. Of course, in Debian it would be easier, as libraries are named using `lib*` for runtimes, and `lib*-dev` for development files, but this is just for demonstration of the technique. Also, it's not always clear, as some packages provide both libraries and binaries.
  • ```sh
  • $ apt-file show libncurses-dev \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libncurses-dev: /usr/bin/ncurses6-config
  • libncurses-dev: /usr/lib/valgrind/ncurses.supp
  • $ apt-file show libncurses6 \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libncurses6: /usr/lib/x86_64-linux-gnu/libform.so.6
  • $ apt-file show libbsd-dev \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libbsd-dev: /usr/lib/x86_64-linux-gnu/libbsd-ctor.a
  • $ apt-file show libbsd0 \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libbsd0: /usr/lib/x86_64-linux-gnu/libbsd.so.0
  • $ apt-file show coreutils \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • coreutils: /usr/bin/[
  • $ apt-file show pass \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • pass: /usr/bin/pass
  • ```
  • This answer is not directly usable under Arch, since I don't know the tools there. I show you a way to do it on Debian, which may inspire you to find a similar way in Arch.
  • With *apt-file*(1), you can list the files that a package provides. From that list, you can see if the package provides files in `/usr/bin/` or in `/usr/lib/`. It's not a perfect approach, since it may provide files in both, in which case you're on your own. Of course, in Debian it would be easier, as libraries are named using `lib*` for runtimes, and `lib*-dev` for development files, but this is just for demonstration of the technique.
  • ```sh
  • $ apt-file show libncurses-dev \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libncurses-dev: /usr/bin/ncurses6-config
  • libncurses-dev: /usr/lib/valgrind/ncurses.supp
  • $ apt-file show libncurses6 \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libncurses6: /usr/lib/x86_64-linux-gnu/libform.so.6
  • $ apt-file show libbsd-dev \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libbsd-dev: /usr/lib/x86_64-linux-gnu/libbsd-ctor.a
  • $ apt-file show libbsd0 \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libbsd0: /usr/lib/x86_64-linux-gnu/libbsd.so.0
  • $ apt-file show coreutils \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • coreutils: /usr/bin/[
  • $ apt-file show pass \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • pass: /usr/bin/pass
  • ```
#7: Post edited by user avatar alx‭ · 2023-10-10T11:19:21Z (7 months ago)
  • This answer is not directly usable under Arch, since I don't know the tools there. I show you a way to do it on Debian, which may inspire you to find a similar way in Arch.
  • With *apt-file*(1), you can list the files that a package provides. From that list, you can see if the package provides files in `/usr/bin/` or in `/usr/lib/`. It's not a perfect approach, since it may provide files in both, in which case you're on your own. Of course, in Debian it would be easier, as libraries are named using `lib*` for runtimes, and `lib*-dev` for development files, but this is just for demonstration of the technique. Also, it's not always clear, as some packages provide bith libraries and binaries.
  • ```sh
  • $ apt-file show libncurses-dev \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libncurses-dev: /usr/bin/ncurses6-config
  • libncurses-dev: /usr/lib/valgrind/ncurses.supp
  • $ apt-file show libncurses6 \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libncurses6: /usr/lib/x86_64-linux-gnu/libform.so.6
  • $ apt-file show libbsd-dev \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libbsd-dev: /usr/lib/x86_64-linux-gnu/libbsd-ctor.a
  • $ apt-file show libbsd0 \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libbsd0: /usr/lib/x86_64-linux-gnu/libbsd.so.0
  • $ apt-file show coreutils \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • coreutils: /usr/bin/[
  • $ apt-file show pass \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • pass: /usr/bin/pass
  • ```
  • This answer is not directly usable under Arch, since I don't know the tools there. I show you a way to do it on Debian, which may inspire you to find a similar way in Arch.
  • With *apt-file*(1), you can list the files that a package provides. From that list, you can see if the package provides files in `/usr/bin/` or in `/usr/lib/`. It's not a perfect approach, since it may provide files in both, in which case you're on your own. Of course, in Debian it would be easier, as libraries are named using `lib*` for runtimes, and `lib*-dev` for development files, but this is just for demonstration of the technique. Also, it's not always clear, as some packages provide both libraries and binaries.
  • ```sh
  • $ apt-file show libncurses-dev \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libncurses-dev: /usr/bin/ncurses6-config
  • libncurses-dev: /usr/lib/valgrind/ncurses.supp
  • $ apt-file show libncurses6 \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libncurses6: /usr/lib/x86_64-linux-gnu/libform.so.6
  • $ apt-file show libbsd-dev \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libbsd-dev: /usr/lib/x86_64-linux-gnu/libbsd-ctor.a
  • $ apt-file show libbsd0 \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libbsd0: /usr/lib/x86_64-linux-gnu/libbsd.so.0
  • $ apt-file show coreutils \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • coreutils: /usr/bin/[
  • $ apt-file show pass \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • pass: /usr/bin/pass
  • ```
#6: Post edited by user avatar alx‭ · 2023-10-10T10:31:29Z (7 months ago)
  • This answer is not directly usable under Arch, since I don't know the tools there. I show you a way to do it on Debian, which may inspire you to find a similar way in Arch.
  • With *apt-file*(1), you can list the files that a package provides. From that list, you can see if the package provides files in `/usr/bin/` or in `/usr/lib/`. It's not a perfect approach, since it may provide files in both, in which case you're on your own. Of course, in Debian it would be easier, as libraries are names using `lib*` for runtimes, and `lib*-dev` for development files, but this is just for demonstration of the technique. Also, it's not always clear, as some packages provide bith libraries and binaries.
  • ```sh
  • $ apt-file show libncurses-dev \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libncurses-dev: /usr/bin/ncurses6-config
  • libncurses-dev: /usr/lib/valgrind/ncurses.supp
  • $ apt-file show libncurses6 \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libncurses6: /usr/lib/x86_64-linux-gnu/libform.so.6
  • $ apt-file show libbsd-dev \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libbsd-dev: /usr/lib/x86_64-linux-gnu/libbsd-ctor.a
  • $ apt-file show libbsd0 \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libbsd0: /usr/lib/x86_64-linux-gnu/libbsd.so.0
  • $ apt-file show coreutils \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • coreutils: /usr/bin/[
  • $ apt-file show pass \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • pass: /usr/bin/pass
  • ```
  • This answer is not directly usable under Arch, since I don't know the tools there. I show you a way to do it on Debian, which may inspire you to find a similar way in Arch.
  • With *apt-file*(1), you can list the files that a package provides. From that list, you can see if the package provides files in `/usr/bin/` or in `/usr/lib/`. It's not a perfect approach, since it may provide files in both, in which case you're on your own. Of course, in Debian it would be easier, as libraries are named using `lib*` for runtimes, and `lib*-dev` for development files, but this is just for demonstration of the technique. Also, it's not always clear, as some packages provide bith libraries and binaries.
  • ```sh
  • $ apt-file show libncurses-dev \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libncurses-dev: /usr/bin/ncurses6-config
  • libncurses-dev: /usr/lib/valgrind/ncurses.supp
  • $ apt-file show libncurses6 \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libncurses6: /usr/lib/x86_64-linux-gnu/libform.so.6
  • $ apt-file show libbsd-dev \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libbsd-dev: /usr/lib/x86_64-linux-gnu/libbsd-ctor.a
  • $ apt-file show libbsd0 \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libbsd0: /usr/lib/x86_64-linux-gnu/libbsd.so.0
  • $ apt-file show coreutils \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • coreutils: /usr/bin/[
  • $ apt-file show pass \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • pass: /usr/bin/pass
  • ```
#5: Post edited by user avatar alx‭ · 2023-10-10T10:30:46Z (7 months ago)
#4: Post edited by user avatar alx‭ · 2023-10-10T10:29:56Z (7 months ago)
  • This answer is not directly usable under Arch, since I don't know the tools there. I show you a way to do it on Debian, which may inspire you to find a similar way in Arch.
  • With *apt-file*(1), you can list the files that a package provides. From that list, you can see if the package provides files in `/usr/bin/` or in `/usr/lib/`. It's not a perfect approach, since it may provide files in both, in which case you're on your own. Of course, in Debian it would be easier, as libraries are names using `lib*` for runtimes, and `lib*-dev` for development files, but this is just for demonstration of the technique. Also, it's not always clear, as some packages provide bith libraries and binaries.
  • ```sh
  • $ apt-file show libncurses-dev \
  • | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • libncurses-dev: /usr/bin/ncurses6-config
  • libncurses-dev: /usr/lib/valgrind/ncurses.supp
  • $ apt-file show libncurses6 \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libncurses6: /usr/lib/x86_64-linux-gnu/libform.so.6
  • $ apt-file show libbsd-dev \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libbsd-dev: /usr/lib/x86_64-linux-gnu/libbsd-ctor.a
  • $ apt-file show libbsd0 \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libbsd0: /usr/lib/x86_64-linux-gnu/libbsd.so.0
  • $ apt-file show coreutils \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • coreutils: /usr/bin/[
  • $ apt-file show pass \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • pass: /usr/bin/pass
  • ```
  • This answer is not directly usable under Arch, since I don't know the tools there. I show you a way to do it on Debian, which may inspire you to find a similar way in Arch.
  • With *apt-file*(1), you can list the files that a package provides. From that list, you can see if the package provides files in `/usr/bin/` or in `/usr/lib/`. It's not a perfect approach, since it may provide files in both, in which case you're on your own. Of course, in Debian it would be easier, as libraries are names using `lib*` for runtimes, and `lib*-dev` for development files, but this is just for demonstration of the technique. Also, it's not always clear, as some packages provide bith libraries and binaries.
  • ```sh
  • $ apt-file show libncurses-dev \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libncurses-dev: /usr/bin/ncurses6-config
  • libncurses-dev: /usr/lib/valgrind/ncurses.supp
  • $ apt-file show libncurses6 \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libncurses6: /usr/lib/x86_64-linux-gnu/libform.so.6
  • $ apt-file show libbsd-dev \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libbsd-dev: /usr/lib/x86_64-linux-gnu/libbsd-ctor.a
  • $ apt-file show libbsd0 \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libbsd0: /usr/lib/x86_64-linux-gnu/libbsd.so.0
  • $ apt-file show coreutils \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • coreutils: /usr/bin/[
  • $ apt-file show pass \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • pass: /usr/bin/pass
  • ```
#3: Post edited by user avatar alx‭ · 2023-10-10T10:29:25Z (7 months ago)
  • This answer is not directly usable under Arch, since I don't know the tools there. I show you a way to do it on Debian, which may inspire you to find a similar way in Arch.
  • With *apt-file*(1), you can list the files that a package provides. From that list, you can see if the package provides files in `/usr/bin/` or in `/usr/lib/`. It's not a perfect approach, since it may provide files in both, in which case you're on your own. Of course, in Debian it would be easier, as libraries are names using `lib*` for runtimes, and `lib*-dev` for development files, but this is just for demonstration of the technique. Also, it's not always clear, as some packages provide bith libraries and binaries.
  • ```sh
  • $ apt-file show libncurses-dev \
  • | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • libncurses-dev: /usr/bin/ncurses6-config
  • libncurses-dev: /usr/lib/valgrind/ncurses.supp
  • $ apt-file show libncurses6 \
  • | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • libncurses6: /usr/lib/x86_64-linux-gnu/libform.so.6
  • $ apt-file show libbsd-dev \
  • | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • libbsd-dev: /usr/lib/x86_64-linux-gnu/libbsd-ctor.a
  • $ apt-file show libbsd0 \
  • | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • libbsd0: /usr/lib/x86_64-linux-gnu/libbsd.so.0
  • $ apt-file show coreutils \
  • | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • coreutils: /usr/bin/[
  • $ apt-file show pass \
  • | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • pass: /usr/bin/pass
  • ```
  • This answer is not directly usable under Arch, since I don't know the tools there. I show you a way to do it on Debian, which may inspire you to find a similar way in Arch.
  • With *apt-file*(1), you can list the files that a package provides. From that list, you can see if the package provides files in `/usr/bin/` or in `/usr/lib/`. It's not a perfect approach, since it may provide files in both, in which case you're on your own. Of course, in Debian it would be easier, as libraries are names using `lib*` for runtimes, and `lib*-dev` for development files, but this is just for demonstration of the technique. Also, it's not always clear, as some packages provide bith libraries and binaries.
  • ```sh
  • $ apt-file show libncurses-dev \
  • | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • libncurses-dev: /usr/bin/ncurses6-config
  • libncurses-dev: /usr/lib/valgrind/ncurses.supp
  • $ apt-file show libncurses6 \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libncurses6: /usr/lib/x86_64-linux-gnu/libform.so.6
  • $ apt-file show libbsd-dev \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libbsd-dev: /usr/lib/x86_64-linux-gnu/libbsd-ctor.a
  • $ apt-file show libbsd0 \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • libbsd0: /usr/lib/x86_64-linux-gnu/libbsd.so.0
  • $ apt-file show coreutils \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • coreutils: /usr/bin/[
  • $ apt-file show pass \
  • | pee \
  • "grep -m1 '/usr/bin/'" \
  • "grep -m1 '/usr/lib/'";
  • pass: /usr/bin/pass
  • ```
#2: Post edited by user avatar alx‭ · 2023-10-10T10:28:53Z (7 months ago)
  • This answer is not directly usable under Arch, since I don't know the tools there. I show you a way to do it on Debian, which may inspire you to find a similar way in Arch.
  • With *apt-file*(1), you can list the files that a package provides. From that list, you can see if the package provides files in `/usr/bin/` or in `/usr/lib/`. It's not a perfect approach, since it may provide files in both, in which case you're on your own. Of course, in Debian it would be easier, as libraries are names using `lib*` for runtimes, and `lib*-dev` for development files, but this is just for demonstration of the technique. Also, it's not always clear, as some packages provide bith libraries and binaries.
  • ```sh
  • $ apt-file show libncurses-dev | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • libncurses-dev: /usr/bin/ncurses6-config
  • libncurses-dev: /usr/lib/valgrind/ncurses.supp
  • $ apt-file show libncurses6 | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • libncurses6: /usr/lib/x86_64-linux-gnu/libform.so.6
  • $ apt-file show libbsd-dev | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • libbsd-dev: /usr/lib/x86_64-linux-gnu/libbsd-ctor.a
  • $ apt-file show libbsd0 | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • libbsd0: /usr/lib/x86_64-linux-gnu/libbsd.so.0
  • $ apt-file show coreutils | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • coreutils: /usr/bin/[
  • $ apt-file show pass | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • pass: /usr/bin/pass
  • ```
  • This answer is not directly usable under Arch, since I don't know the tools there. I show you a way to do it on Debian, which may inspire you to find a similar way in Arch.
  • With *apt-file*(1), you can list the files that a package provides. From that list, you can see if the package provides files in `/usr/bin/` or in `/usr/lib/`. It's not a perfect approach, since it may provide files in both, in which case you're on your own. Of course, in Debian it would be easier, as libraries are names using `lib*` for runtimes, and `lib*-dev` for development files, but this is just for demonstration of the technique. Also, it's not always clear, as some packages provide bith libraries and binaries.
  • ```sh
  • $ apt-file show libncurses-dev \
  • | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • libncurses-dev: /usr/bin/ncurses6-config
  • libncurses-dev: /usr/lib/valgrind/ncurses.supp
  • $ apt-file show libncurses6 \
  • | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • libncurses6: /usr/lib/x86_64-linux-gnu/libform.so.6
  • $ apt-file show libbsd-dev \
  • | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • libbsd-dev: /usr/lib/x86_64-linux-gnu/libbsd-ctor.a
  • $ apt-file show libbsd0 \
  • | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • libbsd0: /usr/lib/x86_64-linux-gnu/libbsd.so.0
  • $ apt-file show coreutils \
  • | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • coreutils: /usr/bin/[
  • $ apt-file show pass \
  • | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
  • pass: /usr/bin/pass
  • ```
#1: Initial revision by user avatar alx‭ · 2023-10-10T10:28:31Z (7 months ago)
This answer is not directly usable under Arch, since I don't know the tools there.  I show you a way to do it on Debian, which may inspire you to find a similar way in Arch.

With *apt-file*(1), you can list the files that a package provides.  From that list, you can see if the package provides files in `/usr/bin/` or in `/usr/lib/`.  It's not a perfect approach, since it may provide files in both, in which case you're on your own.  Of course, in Debian it would be easier, as libraries are names using `lib*` for runtimes, and `lib*-dev` for development files, but this is just for demonstration of the technique.  Also, it's not always clear, as some packages provide bith libraries and binaries.

```sh
$ apt-file show libncurses-dev | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
libncurses-dev: /usr/bin/ncurses6-config
libncurses-dev: /usr/lib/valgrind/ncurses.supp
$ apt-file show libncurses6 | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
libncurses6: /usr/lib/x86_64-linux-gnu/libform.so.6
$ apt-file show libbsd-dev | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
libbsd-dev: /usr/lib/x86_64-linux-gnu/libbsd-ctor.a
$ apt-file show libbsd0 | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
libbsd0: /usr/lib/x86_64-linux-gnu/libbsd.so.0
$ apt-file show coreutils | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
coreutils: /usr/bin/[
$ apt-file show pass | pee "grep -m1 '/usr/bin/'" "grep -m1 '/usr/lib/'"
pass: /usr/bin/pass
```