Linux Fundamentals 02

Source: Internet
Author: User

The line terminator for Linux is: [$]

The line terminator for Windows is: [$+ carriage return]

Directory Management:
LS, CD, pwd, mkdir, rmdir, tree

File Management:
Touch, stat, file, RM, CP, MV, Nano

Date Time:
Date, clock, Hwclock, Cal

To view text:
Cat, TAC, more, less, head, tail

(21)
Cat: Connect and display
-N: When displayed, the number of each line
-E: Displays the Terminator.
Example: Cat/etc/issue
Cadt-n/etc/issue

(22)
Split screen display:
More, less

MORE: Turn backwards
Less: Flip forward

(23)
Head: View Top N rows
Tail: View after n rows
-N: The default value is 10.
In fact,-n can be directly used-2 and other numbers instead.

Tail-f: Look at the end of the file, do not exit, wait for the new content appended to this file to be displayed; (Very useful command)
Explanation: If another program appends content to the end of the file, it is displayed directly in the current program.

(24)
Text Processing:
Cut, join, SED, awk
(sed awk grep is known as the three great tools of text processing)

Cut
-D: Specifies the field delimiter, which is the default space
-F: Specify the fields to display
-F 1,3: shows the first and third one.
-F 1-3: Shows the first to the third one.
Cases:
Cut-d:-F 1/ETC/PASSWD

(25)
Sort text: Sort by default in ASCII table order.
-N: Numeric sorting
-R: Descending
-T: Field delimiter
-K: Which field is the keyword to sort
-U: The same row is only displayed once after sorting
-F: Ignore character capitalization when sorting

Linux Fundamentals 02

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.