Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to write the relative path of linux

Shulou Source: shulou.com Published: 2022-06-02 03:13:18 10月04日 Update

Editor to share with you how to write the relative path of linux, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's learn about it!

The relative path is relative to the current directory of the program, which is constantly changing with the execution of the program.

How to write the relative path of linux?

Relative path:

The path is not written from /, for example, from / usr/share/doc to / usr/share/man, it can be written as: cd.. / man this is how to write the relative path!

In the Linux file system, there are two special symbols that can also represent directories:

"." Represents the current directory

".." Represents the directory one level above the current directory

Note: although the relative path is flexible, it is not safe, and it is likely to omit or confuse the current directory, resulting in errors. Therefore, usually individuals can operate at will, you can use the relative path, but the software installation directory must be correct, and the absolute path is the only wise choice.

The above is all the content of how to write the relative path of linux. Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Path directory content writing program article special secure wise not big not much constantly two individuals most that is location files are made up of more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Linux Shulou Information Redmi Shulou Tech Info