Linux Learning basic commands for individual parameters!

Source: Internet
Author: User

Touch parameters


Linux in the touch command parameter parameters:


-A or--time=atime or--time=access or--time=use only change the access time.


-C or--no-create does not establish any documents.


-D uses the specified date time instead of the current time.


-F This parameter ignores non-processing and is responsible only for compatibility issues with BSD version touch directives.


-M or--time=mtime or--time=modify only change the change time.


-R Sets the date and time of the specified document or directory to the same date and time as the reference document or directory.


-T uses the specified date time instead of the current time.


--help online Help.


--version displaying version information


Echo-n Non-newline output


$echo-N "123"

$echo "456"


Final output

123456


Instead of

123

55W



echo parameter


The-N,-e two parameters of the Linux echo command

ECHO-E Handling Special characters


If the following character is present in the string, it is handled in particular, not as a general text output:

\a issued a warning sound;

\b Delete the previous character;

\c finally not add the line break symbol;

\f the line but the cursor remains in its original position;

\ n Wraps and the cursor moves to the beginning of the line;

\ r The cursor moves to the beginning of the line, but does not wrap;

\ t Insert tab;

\v is the same as \f;

\ \ insert \ character;

\NNN inserts the ASCII character represented by the NNN (octal);


$echo-E "a\bdddd"

dddd


$echo-E "a\adddd"//output also emits alarm sound

Adddd



$echo-E "a\ndddd"//Automatic line wrapping

A

dddd



LS parameter



1. Ls-a lists all files under the file, including "." The beginning of the hidden file (the Linux file hidden file is preceded by the., if present: Represents the existence of the parent directory).

2. Ls-l lists the details of the file, such as creator, creation time, file read-write permission list, and so on.

3. Ls-f add a character to the end of each file to indicate the type of the file. ' @ ' means symbolic link, ' | ' Represents the FIFOs, "/" for the directory, and "=" for the socket.

4. Ls-s prints the size of the file after each file. Size (sizes)

5. ls-t sort files by Time duration (time)

6. ls-a list except "." and ".." Other than the file.

7. Ls-r lists all subdirectories in the directory, equivalent to the "recursive" implementation in our programming

8. ls-l lists the link names of the files. Link (links)

9. ls-s sort files by size



mkdir Parameters:

-M,--mode= mode, set permissions < mode > (similar to chmod) instead of rwxrwxrwx minus Umask

-P,--parents can be a path name. In this case, if some directories in the path do not already exist, and with this option, the system will automatically establish those that do not already exist, that is, multiple directories can be established at one time;

-V,--verbose displays information each time a new directory is created

--HELP Display this help message and exit

--version output version information and exit


MV parameter:

-B or--backup overwrite the file, overwriting the previous backup.

-F or--force if the destination file or directory is duplicated with an existing file or directory, overwrite the existing file or directory directly.

-I or--interactive to ask the user before overwriting.

-s< additional word > or

--suffix=< additional tail > with the-b parameter, you can specify the end of the backup file that you want to append.

-U or--update does not overwrite the destination file when it moves or changes the file name, if the destination file already exists and its file date is newer than the source file.

-V or--verbose displays detailed information when executed.

-v=< method > or

The--version-control=< method > is used in conjunction with the-b parameter to specify the method of backup.

--help display Help.

--version Displays version information.



RM Command Parameters:

-F,--force ignores nonexistent files and never gives hints.

-I,--interactive for interactive deletion

-R,-R,--recursive instructs RM to delete all directories and subdirectories listed in the parameters recursively.

-V,--verbose detailed display of the steps performed

--help Display this help message and exit

--version output version information and exit




CP (copy files or directories)


Parameter:-A: equivalent to the meaning of-pdr;

-D: If the source file is the attribute of the link file, the link file attribute is copied instead of the file itself;

-F: For force, if there is any duplication or other doubt, the user will not be asked, but forced to copy;

-I: If the destination file (destination) already exists, it will ask if the action is true when it is overwritten!

-L: The link file for the hard link is established, not the copy file itself;

-P: Copy the past together with the attributes of the archive, rather than using the default attributes;

-R: Recursive continuous replication, used for directory replication behavior;

-S: Copy as a symbolic link file (symbolic link), i.e. "shortcut" files;

-U: Update destination If destination is older than source!

Finally, note that if the source file has more than two, then the last destination file must be "directory"!




Cat command Parameters


Parameters:

-N or--number the number of rows for all outputs starting from 1

-B or--number-nonblank and-n similar, except for blank lines not numbered

-S or--squeeze-blank when you encounter a blank line that has more than two consecutive lines, replace the blank line with one line

-V or--show-nonprinting


Linux Learning basic commands for individual parameters!

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.