Linux / UNIX: Determine where a binary command is stored / located on file system

5 stars based on 64 reviews

Several Unix dialects use the whereis command to find where programs, or executables, are stored in the file structure of the computer.

To use it at the Unix prompt, enter:. Replace command with the name of the executable for bareos-director 1626-3 binary you are looking. For example, if you are looking for the location of the lpr command, you would enter:. In this example, the query asked about the lpr command, binary command in linux spools jobs to printers.

The operating system returned two answers, and thus two paths. The first path is the location of the lpr executable, and the second path is the location of the lpr manual page.

To find the path the binary command in linux system uses to execute a command when you enter it on the command line, use the which command instead, for example:. This is document acec in the Knowledge Base.

Last modified on Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.

Options Help Chat with a consultant. In Unix, how can I find the correct path to an executable file? To use it at the Binary command in linux prompt, enter: For example, if you are looking for the location of the lpr command, you would enter: To find the path the operating system uses to execute a command when you enter it on the command line, use the which command instead, for example: Introduction to Unix commands Use the Unix find command to search for files.

I need help with a computing problem. Please note that you must be affiliated with Indiana University to receive support. All fields are required. Email address Please provide your IU email address. Please enter your question or describe your problem. I have a comment for the Knowledge Base. Fill out this form to submit your comment to the Binary command in linux Knowledge Base. If you are affiliated with Indiana University and need help with a computing problem, please use the I need help with a computing problem section above, or contact your campus Support Center.

My comment concerns this document.

How to open an account on binary com ipung binary options

  • How to get free money for forex trading dubai

    60 seconds binary options strategies neteller

  • Binare option demokonto

    Audiolibro de forex gratis

Binary option brokers for us traders

  • Get rich quick ideas dubai

    Ozforex canada

  • Webinars for binary options trading systems

    Backtest trading strategy python

  • Price binary options demo steinbacher

    Derivative oscillator binary options strategy

Binary options strategy using moving averages as supported

50 comments Skrill south africa binary options trading sa

Best brokers forex uk

The whereis command is used to locate the binary , the source code and the online manual page for any specified program. A binary is an executable i. Source code is the original form of a program as written by a human using a programming language and before it has been converted by a compiler into a binary.

The online manual pages, commonly referred to as man pages , are normally accessed using the man command. When used without any options , which is most commonly the case, whereis attempts to supply the absolute path names i. Any number of names can be accepted as arguments, and the results for each will be returned on a separate line. Thus, for example, the following would be used to attempt to find the locations of the executable, source code and man page for the ls command which is used to list the contents of any specified directory:.

Although whereis ideally returns three pieces of information for each argument, in reality it often returns fewer and sometimes returns more. For example, it will not return a location for source code for a program on a computer for which the source code has not been installed which is common when programs are installed in precompiled form during installation of the operating system.

Likewise, there may be no man pages for some commands, or there may be more than one. For some commands it might be the case that no executable is returned. Examples include alias and umask.

This is presumably because no separate executables with these names exist and such commands are built directly into the shell i. If an executable, source code or man page file exists on a computer but has not installed in a standard location, no result will be returned for it.

This is because whereis only searches in such locations. An example is the situation in which a user has installed a program in its home directory i. In the event that nothing is found for one or more of the three types of information for which whereis searches for each argument, no error message or other notification is provided. If multiple results are found, whereis returns all of them. In some situations, whereis might return only a single entry for some commands.

This is true in the case of the spell command which, as its name implies, is used to check the spelling of text files , at least on some systems, as can be seen by running the following:. Several options are available to limit the type of results returned by whereis as is the case with the wc command, which by default counts the number of lines, words and characters that are contained in text. The -b option tells it to search only for binaries.

The -m option tells it to search only for man pages. The -s option tells it to search only for sources. Thus, for example, the following could be used to search for only the binaries and source code for the whoami command which reports the owner of the current login session:.

As is generally but not always the case with single-letter options for shell programs, these options can be used together in any combination and any order. The order in which the results are displayed is not affected by the order in which the options are used. Created July 28, Thus, for example, the following would be used to attempt to find the locations of the executable, source code and man page for the ls command which is used to list the contents of any specified directory: This is true in the case of the spell command which, as its name implies, is used to check the spelling of text files , at least on some systems, as can be seen by running the following: Thus, for example, the following could be used to search for only the binaries and source code for the whoami command which reports the owner of the current login session: