In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
1. Cut command
Note: only the results after the operation file are output, and the contents of the file will not be changed.
Cut-d ""-f3jue 6 file
Indicates that columns 3 and 6 are displayed with spaces as delimiters
Cut-d:-f 1BI 3-5 file
Indicates that columns 1 and 3 to 5 are displayed with: as the delimiter
Cut-c n file / / take the nth character
2. Sort command
Usually used in conjunction with the uniq command
Sorting principle: compare the ASCII values of characters or control characters on each line from left to right
1) Summary
The ASCII value of a special symbol is generally less than the ASCII value of a number, and that of a number is less than that of a letter.
2) option
-n is sorted by numeric size; special symbols or letters are treated as the number 0
-r in reverse order in normal order
-t delimiter
3. Uniq command
The condition is: after sorting first, it will be effective to remove the weight.
-c count the number of repetitions
Uniq is equivalent to sort-u
4. Wc command
Option
-l line, count the number of rows
-m statistics of characters
-w word, counting the number of words, how to distinguish separated words? Separated by spaces by default
2mcl.2m is a word.
2mcl is three words.
5. Tee command
1) the tee command redirects the output to the specified file and outputs it to the screen at the same time
2) option
-an append, output append
6. Tr command
For character commands, character replacement commands
7. Split command
For file operations, large files are cut into small files
Option
-b cut the file according to the specified size, and the default file size is bytes
-l cut the file by the specified number of lines
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.