In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 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
[root@centos7 ~] # find / etc/-type f-size + 1m | xargs ls-lh
-rw-r--r--. 1 root root 1.4M Apr 11 2018 / etc/brltty/zh-tw.ctb
-rw-. 1 root root 3.8M Nov 3 2018 / etc/selinux/targeted/active/policy.kern
-rw-r--r--. 1 root root 1.4M Nov 3 2018 / etc/selinux/targeted/contexts/files/file_contexts.bin
-rw-r--r--. 1 root root 3.8M Nov 3 2018 / etc/selinux/targeted/policy/policy.31
-Rafael, Rafe, Rafael. 1 root root 7.8M Jan 4 15:58 / etc/udev/hwdb.bin
[root@centos7 ~] #
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/localsrc directory for backup.
[root@centos7 ~] # tar-zvcf `date +% F`.tar.gz / etc/*.conf & & cp `date +% F`.tar.gz / usr/local/src/
Tar: Removing leading `/ 'from member names
/ etc/asound.conf
/ etc/autofs.conf
/ etc/autofs_ldap_auth.conf
/ etc/brltty.conf
3. Use sed to retrieve the IPv4 address of the local machine in the ifconfig command
[root@centos7 ~] # ifconfig ens160 | sed-nr '2s/ ^ [^ 0-9] + ([0-9.] +).
10.0.1.109
[root@centos7 ~] #
4. Delete all # and white space characters beginning with # followed by at least one white space character in the / etc/fstab file
[root@centos7 ~] # sed-r's / ^ # + (. *) /\ 1Universe'/ etc/fstab
#
/ etc/fstab
Created by anaconda on Sat Jan 4 01:52:46 2020
#
Accessible filesystems, by reference, are maintained under'/ dev/disk'
See man pages fstab (5), findfs (8), mount (8) and/or blkid (8) for more info
#
/ dev/mapper/centos-root / xfs defaults 0 0
UUID=24b6bae0-d077-4259-8529-f778c9c120ce / boot xfs defaults 0 0
/ dev/mapper/centos-swap swap swap defaults 0 0
5. Deal with the / etc/fstab path and use the sed command to extract its directory name and base name
[root@centos7 ~] # echo / etc/fstab | sed-nr's @ (/. *) / (. *) @\ 1roomp'
/ etc
[root@centos7 ~] # echo / etc/fstab | sed-nr's @ (/. *) / (. *) @\ 2roomp'
Fstab
[root@centos7 ~] #
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.