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

How to understand Linux absolute path and relative path

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article focuses on "how to understand the absolute path and relative path of Linux". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to understand the absolute and relative paths of Linux.

Preface

When using linux remote connection to operate files, we will encounter a problem that we must know where the files are stored in order to accurately find and manipulate the files. There are two ways to specify the file address here, that is, the absolute path and the relative path.

Linux file directory

We know that all files (directories) in the Linux system are organized into an inverted tree structure starting with the root directory "/", as shown in the following figure:

Absolute path

The absolute path must start with the root directory / start. When we want the representation of the absolute path to indicate the location of the bin file, the path should be written as / usr/bin. The test code is as follows:

[root@localhost ~] # bin

Bash: bin: command not found

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

Development

Wechat

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

12
Report