Ubuntu命令
1.常用命令
- rz
- sz
- curl
ubuntu/debian 系统安装 Curl 方法: apt-get update -y && apt-get install curl -y
centos 系统安装 Curl 方法: yum update -y && yum install curl -y
安装好 curl 之后就能安装脚本了
curl -X PUT -H “Content-Type: application/json” -d ‘{“status”: 1}’ "http://xxxx/xxxx
curl http://xxx/xxx
- -X PUT -H “Content-Type: application/json” -d ‘{“status”: 1}’ “http://10.39.34.101:30650/config/system/work/status”
- cat命令
cat 20221013.error.log | grep -a “xxxx”
cat 20221013.error.log | grep -a “xxxxx” - tail
tail -f -n 1000 catalina.out | grep -a -3 --line-buffer “发送邮件” | grep -a -3 --line-buffer “异常报警”
tail -f -n 1000 20221013.error.log | grep -a -3 --line-buffer “2022-10-13 16:30:46”
满足一个条件
tail -f catalina.out | grep --line-buffer -E “发送邮件|接收到” - dsf
docker命令
- docker run
docker run -p 6379:6379 --restart=always --net=host --privileged --name redis -v /data/xx/redis/redis.conf:/etc/redis/redis.conf -v /data/aip/redis/data:/data -d 镜像名 容器名 /etc/redis/redis.conf --appendonly yes --requirepass “xxxxx”
sudo docker run -d --restart=always -itd --net=host --privileged -e JAVA_OPTS=‘-Xms1024m -Xmx1024m -XX:+UseConcMarkSweepGC -noverify’ -e APP_PARAMS=‘–spring.profiles.active=prod’ -v /dev/:/dev/ -v /xxx:/xxxx -v /data/xxx/:/data/xxxx/ --name 容器名 镜像名
docker run
–name=xxxxx-web
–volume=/data:/data
–volume=/etc/localtime:/etc/localtime
–network=host
–restart=always
–detach=true
web镜像名
docker run -itd --name aipatrolcar-rabbitmq --restart=always -p 15672:15672 -p 32703:5672 -e RABBITMQ_DEFAULT_USER=xxxx -e RABBITMQ_DEFAULT_PASS=xxxxx 镜像名
-
docker images
docker images | grep xxxxx -
docker ps
docker ps -a -
fsdfs
-
fds
-
fsdf
-
sd