In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the example analysis of the path under Linux, which is very detailed and has a certain reference value. Friends who are interested must finish it!
In general, when we use shell calls, or how you call your application, note that your current path is the path of your called program.
Paths are divided into absolute paths and relative paths:
Absolute path:
In Linux, absolute paths start with / (also known as root), such as / usr, / etc/X11. If a path starts from /, it must be an absolute path, so it is easy to understand
[root@localhost] # pwd Note: determine the current location of the user, that is to say, where he is.
/ root Note: the user is currently located at / root
[root@localhost ~] # cd / usr/share/doc/ Note: we enter the / usr/share/doc directory by absolute path
[root@localhost doc] # pwd Note: determine the current location of the user
/ usr/share/doc Note: the user is located at / usr/share/doc, which seems to have achieved our goal.
Relative path
The relative path is based on. Or; or It started. Represents the location of the user's current operation, and.. Represents the parent directory; in the path,. Represents the directory where the user is currently located, and.. The superior directory needs to be transferred. And... Look at it as a catalog.
[root@localhost ~] # pwd Note: use pwd to determine the location of the current user
/ root Note: find out that the directory is in / root directory
[root@localhost] # cd. Note: we enter.
[root@localhost ~] # pwd Note: determine the location of the current user
/ root Note: get in the / root directory
[root@localhost] # cd. Note: we cut into the parent directory of / root
[root@localhost /] # pwd Note: determine the location of the current user.
/ Note: the user is currently in / (root directory)
The description of some special symbols in the path
These symbols are used in relative paths, and these symbols can bring us convenience, so it is necessary to talk about them.
. Represents the current directory where the user is located
.. Represents the parent directory
~ represents the current user's own home directory
~ USER indicates that the user name is the home directory of USER, where USER is the user name that exists in / etc/passwd.
The above is all the contents of the article "sample Analysis of paths under Linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.