In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you what are the common commands of operation and maintenance. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Common command
1. Exclude logs and temp directories when packing and compressing
# tar-zcvf tomcat-creditcm.tar.gz-exclude=logs-exclude=temp tomcat-creditcm
two。 Use the rsync command to copy only the directory structure, not the files in the directory
# rsync-avH-include "* /"-- exclude "*" / opt/nagios.
3. Copy a large number of files
# find / app/jboss-ruleengine/businessdata20130704/certification/2013-07-04 /-type f | xargs-I-N1 cp {}.
4. Bag grab command
Tcpdump-I eth0-X-s 0-A host 10.150.180.81-w succ20140122
Tcpdump-I eth0-X-s 0-A host 10.150.180.81-r succ20140122 > succ
5. View all living hosts:
Nmap-sP 10.151.10.amp 24 | grep up
6. View all hosts:
Nmap-sP-v 10.151.10.0Universe 24
7. See which directories are shared on the nfs server
# showmount-e 192.168.5.12
Export list for 192.168.5.12:
/ usr/local/apache2/htdocs/VIDEO_TEMP *
8. Displays the client ip of the nfs server already on mount
# showmount-a 192.168.5.12
9. Which software package is installed for a program?
# rpm-qf / bin/bash
Bash-3.2-24.el5
10. Where are the files in a package installed?
# rpm-ql bash-3.2-24.el5
11. An uninstalled software package, using the
# rpm-qlp glib2-2.22.5-5.el6.i686.rpm
12.lvm command:
Add 20g of space to the partition:
# lvextend-L + 20g / dev/mapper/vg-LogVol03
# resize2fs / dev/mapper/vg-LogVol03
Add Partition:
1. Create lv Partition 100G lv data is the partition name, and VolGroup00 is the volume group name
Lvcreate-L 100G-n data VolGroup00
two。 Format lv partitions into ext3 format
Mkfs.ext3 / dev/VolGroup00/data
3. Mount the partition to / data
Mount / dev/VolGroup00/data / data
Increase the swap partition size:
Check cat / proc/swaps and find that the size is not enough. Use the following method to enlarge the partition
1. Swapoff / dev/mapper/rootvg-swaplv
two。 Lvextend-L + 45G / dev/mapper/rootvg-swaplv
3. Mkswap / dev/mapper/rootvg-swaplv
4. Swapon / dev/mapper/rootvg-swaplv
Reduce partition siz
1. Umount partition first
# umount / ynd
two。 Reduce partition size 25G space
# lvreduce-L-25g / dev/rootvg/ynd
13. Memory output
Jmap-histo 19992
14. Linux obtains the local export ip
1. Curl ifconfig.me
# or
two。 Curl http://members.3322.org/dyndns/getip
15. Combined with ping tracert to determine the relevant characteristics of the network, this command is mtr
# mtr-rn 10.151.20.23
Thank you for reading! This is the end of this article on "what are the common commands of operation and maintenance?". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.