Linux rookie take-off road "four" absolute path, relative path and common directory

Source: Internet
Author: User

I. Absolute path and relative pathThere are two paths in the Linux operating system: Absolute path and relative path. When we access files or folders, we actually use paths to manipulate them. Both paths can play an equal role in the actual operation. before we get into the specifics, we need to understand that the filesystem of Linux is a genealogy structure. At the top of the pedigree is the root folder. The root folder is represented by "/". There is a children's folder under the root system, the child has a grandson folder below, and so on. All the files are included in these folders.  absolute paths are always relative to the root folder. Their mark is that the first character is always "/".  relative paths are always relative to the folder location where we are located. Their first character does not have a "/". second, common Linux directory

1./bin: Store the user's common executable file2./sbin: The executable file that holds the system3./home: Store the user's own files and directories, the root user's family directory is/root, the other user is the/home/user name4./dev: Device Files directory5./etc: Configuration file directory6./media | |/mnt: mount point, Mount removable hardware device7./usr/local: Install third-party software, the software in this directory joins the path8./OPT: Install third-party software, the software in this directory does not join the pathattached:

There are several ways that you can execute multiple commands at one time on the command line:

1. Separate each command;

Note: The execution of each command will not affect the execution of other commands. In other words, each command executes, but does not guarantee that each command will execute successfully.

2. Separate && between each command

Note: If the previous command executes successfully, the following command will be executed. This ensures that after all commands have been executed, the execution process is successful.

3. Between each command with | | Separated

Description: | | It means that only the preceding command fails to execute the next command until a successful command is executed.

Linux rookie take-off road "four" absolute path, relative path and common directory

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.