Linux Two week first class (January 29) Notes

Source: Internet
Author: User

Two week first Class (January 29)
2.6 Relative and absolute paths
2.7 CD command
2.8 Creating and deleting catalogs Mkdir/rmdir
2.9 RM Command

2.6 Relative and absolute paths
Path is where the file is stored

An absolute path is a path that starts from the root

The relative path is the path relative to the location.

CD is shorthand for change directory.
Run the CD and go to your home directory.

The appended directory name is switched to the specified directory.

2.7 Command CD
Command cd-to view the last command used, like a TV remote key (return key)

Command CD to enter the user's home directory

Command CD ~ Enter the user's home directory

Command CD: Returns to the previous level of the directory.

2.8 Creating and deleting catalogs Mkdir/rmdir
The command mkdir (shorthand for Make directory) is used to create the directory.

Mkdir-p can create cascading catalogs.
Do not add-p cannot be created

Add-p to create a

You can see the process of creating a cascading catalog.

Command RmDir is a shorthand for remove diretory.
RmDir only empty directories can be deleted

Rmdir-p can delete a cascading directory

2.9 RM Command
RM Command RM is a shorthand for remove and can delete files and non-empty directories.
RM to delete files when asked

Command rm-f do not ask when deleting a file

Command! Tree view the most recent command to start with the tree

Order history to see the command that was knocked over.

You can see the command at the beginning of the last tree

The UP ARROW key is also available, so you can see the commands you've used.

RM cannot delete directories, rm-r can be deleted, will ask, plus-RF can not be asked to delete.

RM-RFV can see the removal process, delete the file first, and then delete the directory.

RM-RFV Delete non-existent files without error.

Linux Two week first class (January 29) Notes

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.