Sunday 13, Apr 2025
We are moved to new domain
Click -> www.ehowtonow.com
Sunday, 10 September 2017

which Linux Command

which

which [options] [--] [commands]
List the full pathnames of the files that would be executed if the named commands had been run. which searches the user's $PATH environment variable.

Options

-a, --all
Print all matches, not just the first.

-i, --read-alias
Read aliases from standard input and write matches to standard output. Useful for using an alias for which.

--read-functions
Read shell functions from standard input and report matches to standard output. Useful for also using a shell function for which itself.

--skip-alias
Ignore --read-alias if present. Useful for finding normal binaries while using --read-alias in an alias for which.

--skip-dot
Skip directories that start with a dot.

--skip-functions
Ignore --read-functions if present. Useful when searching for normal binaries while using --read-functions in an alias or function for which.

--skip-tilde
Skip directories that start with a tilde (~) and executables in $HOME.

--show-dot
If a matching command is found in a directory that starts with a dot, print ./cmdname instead of the full pathname.

--show-tilde
Print a tilde (~) to indicate the user's home directory. Ignored if the user is root.

--tty-only
Stop processing options on the right if not on a terminal.

-v, -V, --version
Print version information and then exit.

--help
Print help information and then exit.

Example

$ which cc ls /usr/bin/cc ls: aliased to ls -sFC

Shop and help us

Flipkart Offer Snapdeal offer Amazon.in offer Amazon.com offer

Related Posts:

  • lockfile Linux Command lockfile lockfile [options] filenames Create semaphore file(s), used to limit access to a file. When lockfile fails to create some of the specified files, it pauses for eight seconds and retries the last one on which it fa… Read More
  • mcopy Linux Command mcopy mcopy [options] sourcefile target Copy files between Unix and MS-DOS format partitions. See cp and mtools for more information. Multiple source files can be specified and written to a target directory. Options The m… Read More
  • lftpget Linux Command lftpget lftpget [options] url Uses the lftp program to fetch the specified URL, which may be HTTP, FTP, or any of the protocols supported by lftp. Options lftpget takes only three options. -c Continue or restart a paused … Read More
  • iptables Linux Command iptables iptables command [options] System administration command. Configure netfilter filtering rules for kernels 2.4 and later. Rules for iptables consist of some matching criteria and a target, a result to be applied if… Read More
  • lftp Linux Command lftp lftp [options] [url] File transfer program with more features than ftp. The lftp command allows FTP and HTTP protocol transfers, plus other protocols including FISH (SSH based), FTPS, and HTTPS. It uses a shell-like c… Read More
  • Blogger Comments
  • Facebook Comments
  • Disqus Comments

0 comments:

Post a Comment

Item Reviewed: which Linux Command Rating: 5 Reviewed By: eHowToNow