Creation of a Linux command file move delete

Source: Internet
Author: User
Tags touch command

Cat

[ function Description ]

Create a file

The #cat command is used to string or display the contents of a file, but if you read the data from a standard input device and redirect the results to a new file, you can reach the purpose of creating a new file. the Cat command can only receive data from the keyboard when editing a new file, and cannot flexibly edit the contents of the file so flexibility is far less flexible than a dedicated text editing tool that can only be used to create simple files

[ syntax Format ]

cat[--heip][--version]>|>>[ file name ]

[ option parameter ]

Parameters

Description

--help

Display Help information and exit

--version

Display version information and exit

ln

[ function Description ]

Establishing a Connection file

# The symbolic connection file is a special file that allows access to files or directories located in other directories using a smaller resource space. A symbolic link file consists of a hard link and a soft link, and a hard link is an inode(node) that points to the block blocks where the file is placed , and the new i node and my file original I nodes point to the same content, and a soft link is a new, separate file that points to the linked file, similar to Win7 the shortcut in

[ syntax Format ]

ln[ parameter ][-t][ source file Link file ]

ln[ parameters [ source file ] []

ln[ parameter [ source file ] [ the directory where the new linked file is located ]

ln[ parameter ][-t][the directory where the new linked file is located ] [ source file ]

[ option parameter ]

Parameters

Description

-B

To back up a target linked file that already exists

-F

When linking, delete the same name file in the same directory as the target linked file, regardless of the file type

-I.

Ask users before overwriting existing files

-N

A soft link to a directory is considered a normal file

-S

Create soft links to source files, not hard links

-T

Specifies the directory to which the linked file is created, by default the linked file is created to the user's directory

-V

Show instruction execution Process

-T

Treat a linked file as a normal file

Mv

[ function Description ]

Move and rename files

#mv can manipulate files, rename directories, and move them

[ syntax Format ]

mv[ parameters [ source files ] [ target files ]

[ option parameter ]

Parameters

Description

-B

If you need to overwrite the file, back up before overwriting

-I.

Interactive operation if the MV operation causes an overwrite of the target file that already exists, the system asks whether to rewrite and the user enters y or nto avoid overwriting it by mistake.

-F

No interactive operation, no hint during MV coverage

-U

If the destination file already exists and is consistent with the source file or is newer than the source file, the file is not moved

-V

Displays the name of the file on the screen while moving each file

-S

The backup suffix character or string is used with the-b parameter to specify the backup file suffix string

Rm

[ function Description ]

deleting files

English xxxx # When some files do not need to be, you can use the RM command to permanently remove from the hard disk, which is typically used to delete files. For linked files, only the link is broken and the source file remains unchanged. The user needs the appropriate action permission when deleting

[ syntax Format ]

rm[ parameters [ file or directory ]

[ option parameter ]

Parameters

Description

-I.

Interactively delete a destination file

-F

In contrast to-I, when deleting a file, the user is not prompted to forcibly delete

-R

Represents RM to delete all directories and subdirectories in the specified destination file list, which can be used to delete non-empty directories

-D

Change the hard link of the directory you want to delete directly to 0, and then delete the directory, noting that the privilege is only available to Superuser

-V

Show command Execution procedure

Touch

[ function Description ]

# A special case of the touch command when creating a file. Touch is used to modify the access and modification time properties of the specified file, create a new empty file if the specified file does not exist, and set the file access at the current time

[ syntax Format ]

touch[-r< Reference file >][ file name ]

[ option parameter ]

Parameters

Description

-r< Reference documents >

Use the time attribute of the reference file to set the new file instead of the current default time

Just do a summary if it is wrong, please Daniel criticism advice.

Sincerely salute

Copyright notice

The contents of this summary are all excerpt from "Linux Command complete technical treasure" Zhang Dong

Creation of a Linux command file move delete

Related Article

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.