Linux commands-File operations classes

Source: Internet
Author: User

Disclaimer: The Linux commands involved in this article are the most common use, not enumerated parameters, self-access man

1.ls view files and directories

-A print all files, including hidden files

-l list printing, data items include file attributes, size and permissions, etc.

-H capacity display in human readable form (GB,KB, etc.)

Example:

Ls-alh test/*.txt View the text file under the test folder

2.MV move a file or directory, or rename

Example:

MV A.txt b.txt Renaming the file a.txt to B.txt

MV Test Test2 Name the folder test Test2

MV a.txt test3/*.txt test4 test2 file a.txt, txt file under folder Test3, and folder test4 move to Folder Test2

3.cp copy files or directories

-R recursive continuous replication for directory replication

-A recursive copy, which is copied along with the properties of the file, and if the file is a connection file, the connection file is copied instead of the file itself

Example:

Cp-i a.txt test2 Copy the file A.txt to the folder Test2

Cp-r test3 test2 Copy folder test3 to folder Test2

Cp-r test3/ test2 Copy the contents of a folder Test3 to a folder test2

4.RM to Remove files or directories

-F ignores files that do not exist

-R Recursive Delete

Example:

RM-RF test2 (/) Delete folder Test2

RM-RF test2/* Delete a folder test2 under the content

Not regularly updated, to be continued ...

Linux commands-File operations classes

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.