Linux Basics-The next day

Source: Internet
Author: User
Tags parent directory

One, relative path and absolute path

In Linux, absolute paths start with/(also known as the root), such as/usr,/etc/x11. If a path is from/to start, it must be an absolute path.

The relative path is in. Or.. A. Represents the location of the user's current operation, while the. Represents the parent directory; In the path, the. Represents the directory in which the user is currently located, while the. Parent directory, to put. and. Look at it as a catalog.


Ii. Summary of CD commands

The CD command is the most basic command in a Linux system, and what it does is change the directory you are currently in, that is, the meaning of switching directories.


Case LIST:

Enter the system root directory

CD/

Use CD command to enter the current user home directory

Cd

CD ~


Jump to the specified directory

Cd/opt/soft

Return to the directory in which it was before entering this directory

CD-


Use the parameters of the previous command as CD parameters

CD!$


Iii. Creating and Deleting catalogs Mkdir,rmdir command summary

mkdir: Create directories and subdirectories.

RMDIR: Delete directories and subdirectories, but the directory must be empty.


mkdir Command parameters:

-M: Setting mode

-P: Can be a full path, if some directory in the path does not already exist, plus this option, the system will automatically establish those that do not already exist, that is, multiple directories can be built at one time


rmdir Command parameters:

-P: Recursively deletes the directory dirname, which is also deleted when its parent directory is empty after the subdirectory is deleted. If the entire path is deleted or a partial path is reserved for some reason, the system displays the corresponding information on the standard output;


Iv. Summary of RM command

RM This command is used to remove files or directories from a Linux system. However, the directory is not generally deleted, and parameters are required.


Command parameters for RM:

-F: Force Delete, ignore nonexistent file, never give hint

-r: Recursively delete directories under files and subdirectories under Files

Common combination: RM-F,RM-FR


Linux Basics-The next day

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.