Group friends @ ask questions Xshell Client Why is there no such file and directory when you enter the command? You can enter the correct directory by entering the same command on the AliCloud website? After studying Weiaisi's blog, I think it is worth mentioning that it contains the understanding of basic knowledge. Laowei shares this article to help us deepen our understanding of the basic knowledge of website paths.
1、 Problem description
Use the Xshell client to enter commands:
cd oneinstack
Prompt - bash No such file or directory
There is no such file or directory.
Let's take a look at Alibaba Cloud Web side SSH Operate the same command, as shown in the figure below, and enter the oneinstack directory successfully.
Instead, use the Xshell client to enter cd/home/admin/oneinstack/to enter the directory correctly.
2、 Why is this?
This involves the basic knowledge of the website Relative path and Absolute path These two concepts. A brief explanation is as follows:
1. The absolute path refers to the real physical path of the file in the hard disk, such as/home/admin/oneinstack above. You can see this path when you connect to the server using ftp software;
2. A relative path is a path relative to a file. For example, if a 1.jpg image is added to the 1.html page of a website, and the two files are placed in the same folder, the 1.jpg code in the 1.html page code is written as follows:<img src ="1. jpg"/>, the picture can be displayed normally.
Please move to related content Website directory/absolute path/relative path - zero infrastructure wordpress tutorial Before you start a website, you should thoroughly understand these two concepts. Otherwise, if you encounter similar problems later, you will still be confused, which will affect the work of the website.