0

By man which, I found that which is a shell script provided by Debian.

Does Debian put the usages of all the provided commands in some documents? similar to the manual of coreutils?

I checked https://www.debian.org/doc/user-manuals, but I didn't find the usage of which.

Thanks.

2 Answers 2

4

I don’t know of a list of all the Debian-specific commands. However you’ll find all the manpages in Debian on manpages.debian.org, and you can view them by package, which will allow you to find commands packaged together in packages such as debianutils, which includes which.

3

I found that which is a shell script provided by Debian.

Nowhere on that manual page does it actually say that it is a shell script. In the Z shell, the C shell, and the TENEX C shell it is in fact a shell built-in command. It is only with the other shells like the Bourne Again, Korn, and Almquist shells that one actually ends up running the external /bin/which that is supplied by the debianutils package.

Does Debian put the usages of all the provided commands in some documents?

There is no group of people that is centrally responsible for manuals. The various individual people who make the packages also write the accompanying doco. Some softwares come with good manuals. Far too many come with mediocre, bad, or even no manuals.

Nor is there any list of "all provided commands". What commands you have available depends from what packages you have installed. And (at least with the well written softwares) the manuals come either in those self-same packages or in an associated -doc or similar package.

(A bloke by the name of Daniel J. Bernstein once had an idea to fix this. Each package would install its command list into a specific subtree named after the package, and a utility run after installing/removing packages would merge all of the command lists into one big list, indexing all of the per-package doco. Debian does not do this.)

As you have seen, the /bin/which that comes in the debianutils package comes with a manual page in that very same package.

I didn't find the usage of which.

Yes, you did. It's right there, on the very manual page that you looked at. Under "SYNOPSIS".

For the Z shell built-in command, that supports rather more options, see the zshbuiltins manual. For the TENEX C shell built-in command, see the tcsh manual.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .