基本命令
cd /usr
mkdir tes
touch 1.txt
cp 1.txt tes
mv 1.tex tes/2.txt
mv 1.tex tes/
rm 1.txt
rm -rf tes/
cat 1.txt
vi 1.txt
tail -f 1.txt
ps -aux|grep redis
kill -9 111
nohup java -jar tes.jar &
stat 1.txt
touch -d "01:01:01" 1.txt
chmod -R 777 /usr
cat /proc/meminfo | grep MemTotal
lsb_release -a
shutdown -h now
shutdown -r now
查看端口号占用情况
netstat -anp |grep 8081
netstat -aon|findstr 8081
cpulimit限制进程
nohup cpulimit -e httpd -l 40 &
定时任务
service crond status
crontab -l
crontab –e
crontab –r
查找文件(夹)
whereis 1.txt
find /usr/ -name "*.txt"
find /usr/ -name "tes*"
find /usr/ -type f -name "tes*"
find /usr/ -type d -name "tes*"
find /usr/ -type -f -mmin -1
nginx
./nginx -t
./nginx -s reload
./nginx -c /usr/local/nginx/conf/nginx.conf
redis
./redis-server /usr/local/redis/etc/redis.conf
docker
systemctl start docker
systemctl restart docker
systemctl stop docker
docker images
docker ps -a
docker ps
docker ps -a --no-trunc
docker exec -it nginx /bin/bash
docker exec -it nginx /bin/sh
tail -f /var/log/messages
docker logs --tail=10 name