Linux Basic Learning-catalog files and links

Source: Internet
Author: User
First, directory operations

1.mkdir-p A/B/C/D recursive creation of directories

2.PWD (Print working directory) displays the current directory path

3.rmdir directory name, delete empty directory

4.RM-RF file name, deleting directory

-R Delete Directory

-F Force Delete

5.CP-RP Directory destination directory, copy directory

-R Copy Directory

-P Reserved Properties

Ii. Processing of documents

1.touch filename, creating an empty file

2.cat filename, displaying file contents

-N Display Line number

3.tac Inverted Display file contents

4.more and less

Use these two commands to view content when there is too much content in the file, less to page up and use/XX to search

5.head-n 7 file name to view the first 7 lines of content

6.tail-f filename, dynamically view the last line of the file

Third, the link

ln Original File Destination file

Parameter:-s to generate soft links

Soft Links: Similar shortcuts

Hard link: The same information as the original file (compared to the cp-p file it can be updated synchronously, I node is the same, cannot boast partition creation, cannot set hard link to the directory)

When the original file is deleted, the soft link fails and the hard link is not affected.

Example:

Ln-s/etc/issue/tmp/issue.soft

Ln/etc/issue/tmp/issue.hard

Linux Basic Learning-catalog files and links

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.