In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
NAME
The which-show the full path of (shell) commands displays the full path to the command.
SYNOPSIS
Which [options] [-] programname [...]
DESCRIPTION
Which takes one or more arguments. For each of its arguments it prints to stdout the full path of the executables that would have been executed when this argument had been entered at the shell prompt. It does this by searching for an executable or script in the directories listed in the environment variable PATH using the same algorithm as bash (1).
Which can take one or more parameters. For each parameter, when this parameter is typed into the shell command prompt, it prints the full path to the executable file to standard output. Using the same algorithm as bash (that is, showing which one was found first), it executes the search executable or script file in the directory listed in the PATH environment variable.
Example 1: find files and display command paths
Description:
Which searches for runnable blocks according to the directories in the PATH variables configured by the user! So, of course, different PATH configurations find different commands.
Example 2: use which to find which
Description:
Unexpectedly, there will be two which, one of which is alias, which is the so-called "command alias", which means that typing which will be equal to the following string of commands!
Example 3: find out the command cd
Description:
The commonly used command cd can't be found? Why? This is because cd is a bash built-in command! But which defaults to looking for directories contained in PATH, so of course you can't find them.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.