In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
1. Find all files in the / etc directory that are larger than 1m and whose types are ordinary files
Find:
Find / data-name "f *"-a-type f
Find [OPTION]... [search path] [search condition] [processing action]
Find path: specify a specific target path; default is the current directory
Search criteria: specified search criteria, such as file name, size, type, permissions, etc.; default is to find all files under the specified path
Processing action: operate on files that meet the criteria, and output to the screen by default
2. Package all the files at the end of conf under the / etc/ directory. The compressed package name is the time of the day, and copy it to the / usr/local/src directory for backup.
3. Use sed to retrieve the IPv4 address of the local machine in the ifconfig command
Sed is a stream editor:
It processes one line at a time. When processing, the currently processed line is stored in a temporary buffer, called "pattern space" (pattern space), and then the contents of the buffer are processed with the sed command, and when the processing is completed, the contents of the buffer are sent to the screen. Then read down the line and execute the next loop. If there is no special command such as'D', the pattern space is cleared between the two loops, but not the reserved space. This is repeated until the end of the file. The contents of the file have not changed unless you use redirect to store the output
4. Delete all # and white space characters beginning with # followed by at least one white space character in the / etc/fstab file
5. Deal with the / etc/fstab path and use the sed command to extract its directory name and base name
Address demarcation:
(1) No address: process the full text
(2) single address:
#: specified line, $: last line
/ pattern/: every line that can be matched by the pattern here
(3) address range:
#, #
#, + #
/ pat1/,/pat2/
#, / pat1/
(4): step by step
1x 2 odd lines
2an even 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.