Common uses of common commands

Source: Internet
Author: User

1.PWD: Output Current working directory

-L: Displays the current directory, containing the link in time (default property)

-P; Show links to the original file directory

2.screen: Terminal Screen Management

–S: Create a new screen session:

–x: Join Screen session:

Exit: Exit and close the screen session:

Ctrl+a,d: Peel the current screen session:

-ls: Displays all screen sessions that are already open:

-R: Resuming a screen session

3.echo: Standard output of strings

-N: does not wrap characters at the end of the line

-E: If the following characters appear in the string, they are handled in particular, not as normal text output

\a; to make a warning sound

\b: Backspace key

\c: Finally, no line break symbol is added

\ n; Wrap and move the cursor to the beginning of the line

\ r; Enter, that is, the cursor moves to the beginning of the line, but does not wrap

\ t; Insert tab

\ \; Insert \ Character

\0NNN: inserting ASCII characters represented by NNN (octal)

4.history: View History

-C: Empty command history

-D: Delete the command specified in history

#: Show Recent # History

-A: Append the newly executed command history list to the history file for this session

-N: Read unread rows to History list in history file

-r: Read history file attached to History list

-W: Save History list to specified history file

-P: Expands the history parameter into multiple lines, but does not exist in the history list

-S: Expands the history parameter into a row, appended to the history list

5.ls: List current or specified directory contents

-A: Contains hidden files

-L: Show additional information

-r: Directory recursion through

-ld: Directory and Symbolic link information

-1: File branch display

–S: Sort by big to small

–u: with-t option, display and press atime new to old sort

–U: Do not sort by directory store order display

6.touch: Change file timestamp

-A: Change atime only

-M: Change Mtime only

-t:stamp: [[CC]YY]MMDDHHMM[.SS]

-C: If the file does not exist, it is not created

7.CP: Copying files

-I: Interactive

-R,-r: recursively copy directories and all internal content;

-A: Archive, equivalent to-DR--preserv=all

-d:--no-dereference--preserv=links does not copy the original file, only the link name is copied

--preserv[=attr_list] Mode: Permission ownership: belongs to the main group Timestamp:links xattr context All

-P: Equivalent--preserv=mode,ownership,timestamp

-V:--verbose

-F:--force

8.RM: Delete command

-I: Interactive

-F: Force delete

-R: Recursive

9.tree Display directory tree

-D: Show only directories

-L Level: Specifies the number of levels to display

-P Pattern: Displays only the paths that are matched by the specified pattern

10.mkdir Creating a Directory

-P: exists in no error, and can automatically create the required directories;

-V: Show more information

-M MODE: Specify permissions directly when creating a directory;

11.rmdir Delete Empty Directory

-P: Recursive deletion of the parent empty directory

-V: Show more information


Common uses of common commands

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.