That's how Linux should learn--command set 4

Source: Internet
Author: User
Tags touch command

1.touch command for creating blank files and modifying file time: (Touch [Options] [file])

There are three kinds of times for files in Linux:

Change Time (mtime): Content modification time (not including permissions)

Change Permissions (CTime): Change the time for permissions and properties

Read Time (Atime): Time to read the contents of the file

Appendix:

-A near-modified "Access Time" (Atime)

-M near-modified "Change Time" (Mtime)

-D simultaneous modification of atime and Mtime

-T to change to the time [YYMMDDHHMM]

2.mkdir to create a blank folder: (mkdir [Options] directory)

mkdir Jacun

Appendix:

-m=mode Default file directory permissions, such as "-m755"

-P continuous creation of multi-level directories (ignored if the folder already exists)

-V shows the process of creation

3.CP commands for copying files or directories: (CP [option] source file destination file)

Three scenarios for copying commands:

The destination file is a directory where the source files are copied into the directory.

The destination file is a file that overwrites the source file with the file.

The destination file does not exist, and the source file will be copied and modified to the name of the target file (rename).

Appendix:

-P preserves the properties of the original file

-D If the object is a "linked file", the property of the linked file is preserved

-R recursive continuous replication (for directory)

-I if the target file is present, ask whether to overwrite

-a equivalent to-PDR (P,d,r for the above parameters)

4.MV commands for moving files or renaming: (mv [Options] file name [target path | target file name])

5.rm command to delete a file or directory: (rm [Options] file)

Appendix:

-F Ignore Warning message

-I ask before deleting

-R Delete Folder

Linux system also has a rmdir command, unlike the RM-RF command will delete everything, but gold delete empty directory, encountered in the directory containing files will be error.

The 6.DD command is used to specify the size of the copied file or to specify the conversion file: (dd [parameter])

If the file name is entered

The file name of the output

BS setting the size of each "block"

Count sets the number of "blocks" to copy

Conv-ucase converting letters from small to uppercase

Conv-lcase converting characters from uppercase to lowercase

That's how Linux should learn--command set 4

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.