初级Linux运维
pwd
cd -
ll -a
ll -i
mkdir -p /tmp/a
rm -rf test_dir
cp test.txt /tmp
head -5 /etc/passwd
tail -f /var/log/messages
echo "hello"> 1.txt
chmod 755 test.sh
chown root test.txt
df -h / && df -i /
free -h
/etc/sysconfig/network-scripts/ifcfg-ens33
/etc/yum.repos.d/kylin_x86_64.repo
yum -y install network-scripts
systemctl restart network
/etc/netplan/00-installer-config.yaml
netplan apply
hostnamectl set-hostname web01
/etc/resolv.conf
/etc/rc.d/rc.local
chmod +x /etc/rc.d/rc.local
/etc/profile #PATH
/etc/motd
/var/log/messages
/var/log/secure
/var/log/auth.log
lscpu
/proc/loadavg
uptime
w
/etc/os-release
date
yum -y install ntpdate
ntpdate ntp1.aliyun.com
clock -w
vim /etc/locale.conf
localectl set-locale LANG=en_US.UTF-8
source /etc/locale.conf
systemctl status firewalld
systemctl stop firewalld
systemctl disable firewalld
vim /etc/apt/sources.list
apt update
ping -c1 -W1 www.baidu.com &>/dev/null
sort 1.txt | uniq -c
grep -c '/bin/bash' /etc/passwd
awk '$2>=70 && $2<=80' count.txt | wc -l
du -sh /var/log/messages
yum -y remove wget
yum list |grep wget
ip route del 0/0 via 10.0.0.2
route -n
yum clean all
yum search rz
yum repolist
yum -y install lrzsz
apt -y install lrzsz
yum -y install --downloaddir=/root --downloadonly wget
rz
sz
mount /dev/cdrom /mnt
rpm -ivh xxx.rpm
rpm -e wget
rpm -q lrzsz
dpkg -i xxx.deb
dpkg -r wget
dpkg -l wget
stat 1.txt
dd if=/dev/zero of=10.txt bs=1M count=10
ln 1.txt 2.txt
ln -s /root/oldboy /opt/test
find /opt/ -type f
find /tmp -mtime +25 \( -name "*.temp" -o -name "*.log" \) -delete
find /opt/ -maxdepth 1 -type f
find /opt/ -inum xxx
find oldboy -name "2.txt" | xargs -i cp {} /tmp
find oldboy -name "1.log" -exec ls -l {} \;
ls -l `find oldboy -name "2.log"`
ls -l $(find oldboy -name "2.log")
hostname -I
tar zcvf a.tar.gz 1.txt 2.txt
tar zcvf /opt/all.tar.gz /etc/hosts /etc/passwd
tar zcvf /data/server/backup/conf_bak_$(date +%F).tar.gz /data/server/conf &>/dev/null
tar tf a.atr.gz
tat xf a.tar.gz -C /opt
zip a.zip 1.txt 2.txt
zip /opt/b.zip /etc/hosts /etc/passwd
unzip b.zip 1.txt
unzip b.zip -d /opt
alias grep='grep --color=auto'
grep -vE '^#|^$' /etc/passwd
grep '^dev.*/bin/bash$' /etc/passwd
grep -n 'ERROR' /var/log/messages
grep -v '/sbin/nologin$' /etc/passwd |awk -F: '{print $1}'
sed -n '8,16p' /etc/passwd
sed 's#http://#https://#g' /tmp/app.conf
awk -F: 'NR==20{print $1,$3,$6}' /etc/passwd
grep -c '/bin/bash$' /etc/passwd
lsof | grep mysql | grep deleted
du -sh /data/storage
find / -type d -exec du -si {} \; | sort -nr | head -10
groupadd -g1050 dev_team
useradd -u1050 -g1050 -c 'user' -s /bin/bash dev01
echo dev01:oldboy123.com |chpasswd
visudo
dev01 ALL=(ALL) NOPASSWD:/usr/bin/df,/usr/bin/du
chattr +a /data/server/log/app.log
chattr +i /data/server/conf/app.conf
chmod 1777 /tmp/dev_share
crontab -l
crontab -e
*/5 * * * * ntpdate ntp.aliyun.com &>/dev/null
0 5 * * * find /tmp -type f -mtime +45 -delete &>/dev/null
swapon -s
chmod 600 /opt/2g.txt && mkswap /opt/2g.txt && swapon /opt/2g.txt
vim /etc/fstab
/opt/2g.txt none swap defaults 0 0
swapoff /opt/2g.txt && sed -i '/\/opt\/2g.txt/d' /etc/fstab && rm -f /opt/2g.txt && free -h
find / -type d -exec du -si {} \; |sort -nr |head
mkdir -p /data1
parted /dev/sdb mklabel gpt
parted /dev/sdb mkpart primary xfs 1M 100%
partprobe /dev/sdb
mkfs.xfs -f /dev/sdb1
mount /dev/sdb1 /data1
systemctl stop tomcat
mv /usr/local/tomcat/logs/cat.out /data1/
ln -s /data1/cat.out /usr/local/tomcat/logs/cat.out
systemctl start tomcat
vim /etc/fstab
/dev/sdb /data1 xfs defaults 0 0
mount -a
lsof | grep '/usr/local/tomcat/logs/cat.out' | grep deleted
kill -9 4567
touch /server/scripts/dfmail.sh
chmod +x /server/scripts/dfmail.sh
crontab -e
*/3 * * * * sh /server/scripts/dfmail.sh &>/dev/null
echo "xxx" |mail -s "tt" mail@
mail -s "tt" mail@ < file
cd -
ll -a
ll -i
mkdir -p /tmp/a
rm -rf test_dir
cp test.txt /tmp
head -5 /etc/passwd
tail -f /var/log/messages
echo "hello"> 1.txt
chmod 755 test.sh
chown root test.txt
df -h / && df -i /
free -h
/etc/sysconfig/network-scripts/ifcfg-ens33
/etc/yum.repos.d/kylin_x86_64.repo
yum -y install network-scripts
systemctl restart network
/etc/netplan/00-installer-config.yaml
netplan apply
hostnamectl set-hostname web01
/etc/resolv.conf
/etc/rc.d/rc.local
chmod +x /etc/rc.d/rc.local
/etc/profile #PATH
/etc/motd
/var/log/messages
/var/log/secure
/var/log/auth.log
lscpu
/proc/loadavg
uptime
w
/etc/os-release
date
yum -y install ntpdate
ntpdate ntp1.aliyun.com
clock -w
vim /etc/locale.conf
localectl set-locale LANG=en_US.UTF-8
source /etc/locale.conf
systemctl status firewalld
systemctl stop firewalld
systemctl disable firewalld
vim /etc/apt/sources.list
apt update
ping -c1 -W1 www.baidu.com &>/dev/null
sort 1.txt | uniq -c
grep -c '/bin/bash' /etc/passwd
awk '$2>=70 && $2<=80' count.txt | wc -l
du -sh /var/log/messages
yum -y remove wget
yum list |grep wget
ip route del 0/0 via 10.0.0.2
route -n
yum clean all
yum search rz
yum repolist
yum -y install lrzsz
apt -y install lrzsz
yum -y install --downloaddir=/root --downloadonly wget
rz
sz
mount /dev/cdrom /mnt
rpm -ivh xxx.rpm
rpm -e wget
rpm -q lrzsz
dpkg -i xxx.deb
dpkg -r wget
dpkg -l wget
stat 1.txt
dd if=/dev/zero of=10.txt bs=1M count=10
ln 1.txt 2.txt
ln -s /root/oldboy /opt/test
find /opt/ -type f
find /tmp -mtime +25 \( -name "*.temp" -o -name "*.log" \) -delete
find /opt/ -maxdepth 1 -type f
find /opt/ -inum xxx
find oldboy -name "2.txt" | xargs -i cp {} /tmp
find oldboy -name "1.log" -exec ls -l {} \;
ls -l `find oldboy -name "2.log"`
ls -l $(find oldboy -name "2.log")
hostname -I
tar zcvf a.tar.gz 1.txt 2.txt
tar zcvf /opt/all.tar.gz /etc/hosts /etc/passwd
tar zcvf /data/server/backup/conf_bak_$(date +%F).tar.gz /data/server/conf &>/dev/null
tar tf a.atr.gz
tat xf a.tar.gz -C /opt
zip a.zip 1.txt 2.txt
zip /opt/b.zip /etc/hosts /etc/passwd
unzip b.zip 1.txt
unzip b.zip -d /opt
alias grep='grep --color=auto'
grep -vE '^#|^$' /etc/passwd
grep '^dev.*/bin/bash$' /etc/passwd
grep -n 'ERROR' /var/log/messages
grep -v '/sbin/nologin$' /etc/passwd |awk -F: '{print $1}'
sed -n '8,16p' /etc/passwd
sed 's#http://#https://#g' /tmp/app.conf
awk -F: 'NR==20{print $1,$3,$6}' /etc/passwd
grep -c '/bin/bash$' /etc/passwd
lsof | grep mysql | grep deleted
du -sh /data/storage
find / -type d -exec du -si {} \; | sort -nr | head -10
groupadd -g1050 dev_team
useradd -u1050 -g1050 -c 'user' -s /bin/bash dev01
echo dev01:oldboy123.com |chpasswd
visudo
dev01 ALL=(ALL) NOPASSWD:/usr/bin/df,/usr/bin/du
chattr +a /data/server/log/app.log
chattr +i /data/server/conf/app.conf
chmod 1777 /tmp/dev_share
crontab -l
crontab -e
*/5 * * * * ntpdate ntp.aliyun.com &>/dev/null
0 5 * * * find /tmp -type f -mtime +45 -delete &>/dev/null
swapon -s
chmod 600 /opt/2g.txt && mkswap /opt/2g.txt && swapon /opt/2g.txt
vim /etc/fstab
/opt/2g.txt none swap defaults 0 0
swapoff /opt/2g.txt && sed -i '/\/opt\/2g.txt/d' /etc/fstab && rm -f /opt/2g.txt && free -h
find / -type d -exec du -si {} \; |sort -nr |head
mkdir -p /data1
parted /dev/sdb mklabel gpt
parted /dev/sdb mkpart primary xfs 1M 100%
partprobe /dev/sdb
mkfs.xfs -f /dev/sdb1
mount /dev/sdb1 /data1
systemctl stop tomcat
mv /usr/local/tomcat/logs/cat.out /data1/
ln -s /data1/cat.out /usr/local/tomcat/logs/cat.out
systemctl start tomcat
vim /etc/fstab
/dev/sdb /data1 xfs defaults 0 0
mount -a
lsof | grep '/usr/local/tomcat/logs/cat.out' | grep deleted
kill -9 4567
touch /server/scripts/dfmail.sh
chmod +x /server/scripts/dfmail.sh
crontab -e
*/3 * * * * sh /server/scripts/dfmail.sh &>/dev/null
echo "xxx" |mail -s "tt" mail@
mail -s "tt" mail@ < file
下一篇:我们都一样
声明:以上文章均为用户自行添加,仅供打字交流使用,不代表本站观点,本站不承担任何法律责任,特此声明!如果有侵犯到您的权利,请及时联系我们删除。
文章热度:☆☆☆☆☆
文章难度:☆☆☆☆☆
文章质量:☆☆☆☆☆
说明:系统根据文章的热度、难度、质量自动认证,已认证的文章将参与打字排名!
本文打字排名TOP20
登录后可见
