Linux entry record: Third, basic operation management of Linux files

Source: Internet
Author: User

I. Copying files and directories

To copy a file or directory using the CP command:

$ CP source file (clip) target file (clip)

Common parameters:

   -R recursive replication entire directory tree   -V displays details of the replication process

  

Second, move, rename files or directories

To move or rename a file or directory with the MV command:

$ MV File destination Directory

If you specify a filename, you can rename the file.

Iii. Creating and deleting files

You can create an empty file or update the file time by using the touch directory:

$ Touch Test.md

You can delete a file or directory by using the RM command:

$ RM test.md

Common parameters:

-I   interactively delete, delete each file immediately before the query-R   recursive Delete, including subdirectories and files under the directory-F   forced deletion, no warning (use with caution)

  

Iv. Creating and deleting directories
    1. Create a directory with the mkdir command
    2. Delete an empty directory from the rmdir directory
    3. Delete a non-empty directory by using the RM -R [-f] command

Linux entry record: Third, basic operation management of Linux files

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.