Get the App
SLTechnology News&Howtos  ›  Servers  › 

Basic commands commonly used in Linux

Shulou Source: shulou.com Published: 2022-06-02 22:48:48 09月22日 Update

Format of the Linux command line

The characteristics of the command word [option] [parameter]

Command words are unique; the characteristics of strictly case-sensitive options

Option to achieve the specific function of the command word; the option is divided into short format, one-represents the short format, and the option-represents the characteristics of the long format parameter

Parameters are objects processed by the command to quickly edit the Linux command

1) tab key

The completion key of the Linux command; speed up the user to enter the command

2) backslash

\ force command line feeds

3) CTRL+K

All characters after the cursor is deleted

4) CTRL+U

Remove the character from the cursor position to the beginning of the line

5) CTRL+L

Clear the screen display

6) Force termination of command editing

CTRL+C

7) use pwd to view locations

8) change the directory from cd to root

9) cd changes to the user host directory

Common options for ls

-a show hidden directory

-A shows the parent directory

-l display details in long format

-h displays the size in KB,M bit units

-d View the properties of the directory

-R recursively displays the information in the directory

-- color display color

Create directories and files

Cp replicates data

Common options for cp

-f found that the same name is directly overwritten

-I found whether the reminder with the same name is overwritten

-p copy the file directory to keep the source file permissions unchanged

-r copy the data in the directory in a loop

Mv renames files or directories can also cut data to use

Find lookup file

-name looks up the name

-size lookup size

-user to find users

-type finds the specified type, f file, d directory, b device block, c character device

Common options for rm

-f does not remind you to force deletion

-I remind you to confirm

-r cycle to delete directory data

Tags: Directory command file format command word data parameter size character common characteristic user force location information cursor device switch loop content Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple OPPO Reno macOS Redmi Shulou Technology