"Linux" command--file directory

Source: Internet
Author: User

# 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

"Linux" command--file directory

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.