Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The representation of relative paths in linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Today, the editor shares with you the expression of the relative path in linux, which is not well understood by many people. Today, in order to give you a better understanding of the expression of the relative path in linux, I have summarized the following and let's look down together. I'm sure you'll get something.

For example, if you want to enter the / usr directory under the current path of / var/log, you can execute the following command:

Cd. /.. / usr # retreats to the / var directory through the relative path, then to /, and finally to / usr

The equivalent path is relative to the current directory.

.. / # indicates the parent directory. / # indicates the current directory. / XXX # indicates the XXX file or the XXX directory under the current directory

You don't have to go back to the directory to use a relative path.

If the current path is / var/log, you want to go to / var/run/.

Cd.. / run # retreat to the / var directory, and then go to the run directory under the / var directory

The above is a brief introduction to the representation of the relative path in linux. Of course, the differences in the detailed use of the above have to be understood by everyone. If you want to know more, 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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report