| # |
Administrator |
| $ |
Normal User |
| Drwxrw-rwx |
d (Directory, file "-") rwx (owner) rw-(group) rwx (others) |
| Pwd |
Print working directory prints the current working directory |
| CD [~] [/] [...] [ .] |
Change Directory |
| LS [-A] [-l] [-r] |
list [all] [long] [recursive recursive], viewing files and directories |
| ll |
Similar ls-l |
| Locate keywords |
Extensive search |
| Find directory-name file name |
Directed lookup |
| CTRL + C |
Interrupt |
| Wc-l file_name |
Word count-line count rows |
| Cat |
1, the whole display: concatenate chain |
| Cat >filename << Terminator EDF |
2. Create a file |
| Cat File1 file2 >file |
3. Merging files |
| Cat file_name | Wc-l |
Number of rows of statistics |
| Cat-n file_name | grep pattern |
Show matching line numbers |
| More file_name |
Show pages by page |
| Q |
Quit quitting |
| Enter |
Next line |
| F= next key =space space key |
Next page (Forward forward) |
| B= on key |
Prev (back) |
| / |
Search searches |
| Less file_name |
With more |
| Cat;less;more |
Read |
| Vi;vim |
Write |
| Head-n file_name |
Top 200 rows |
| Head-n -200 file_name |
Except for the first 200 lines |
| Tail-n file_name |
After 200 lines |
| grep pattern file_name-n line number > New_file_name |
Find strings and redirect |
| grep pattern1 file_name | grep pattern2 file_name | Grep-v pattern3 file_name | Wc-l |
Matches pattern 1 and matches pattern 2 and does not match the number of lines in pattern 3;-V (invert inversion) |
| Cut [-D pattern] [-f-file_name] |
Default tab segmentation, [-d] specifies pattern separation; [-f-front] intercept the first three columns (before the destine designation) |
| Sort |
Sort |
| Uniq [-c] |
De-weight (count count) |
| chmod 764 file name |
Change permissions: 7 (owner) 6 (Group) 4 (other); r-4,w-2,x-1,--0 |
| Chown New owner file name |
Change owner |
| CP Source File Destination Directory |
Copy copied files |
| CP Filename1/home/filename2 |
Copy files and rename them at the same time |
| MV Source File Destination Directory |
Move moving files |
| Mkdir |
Create a Directory |
| RM [-V Show Delete Information] [-R Recursion] [-f Force] |
Delete |