Centos 最小化安装命令

1
2
3
4
yum install  vim iotop bc gcc gcc-c++ glibc glibc-devel pcre \
pcre-devel openssl openssl-devel zip unzip zlib-devel net-tools \
lrzsz tree ntpdate telnet lsof tcpdump wget libevent libevent-devel \
bc systemd-devel bash-completion traceroute -y

Ubuntu 最小化安装命令

1
sudo apt-get install build-essential cmake pkg-config qt4- qmake libqt4-dev desktop-file-utils \ libavformat-dev libavcodec-dev libavutil-dev libswscale- dev libasound2-dev libpulse-dev libjack-jackd2-dev \ libgl1-mesa-dev libglu1-mesa-dev libx11-dev libxfixes-dev libxext-dev libxi-dev libxinerama-dev selinux-utils

删除一个文件里面的所有空格

#grep
grep -v "^$" a.txt
grep [^$] ip1 
#sed
sed '/^$/d' data.txt
sed '/^\s*$/d' data.txt 
#awk
awk NF data.txt
awk '!/^$/' data.txt
#tr
tr -s '\n' < data.txt