常用命令
ssh root@47.xxx.xxx.46
scp root@47.xxx.xxx.46:/www/wwwroot/xxxx.zip /Users/xxxx/work/
scp xxx.log root@192.168.0.1:/tmp/
php artisan serve --port=80
docker常用命令
docker rmi -f $(docker images -aq)
docker rm -f $(docker ps -aq)
docker pull 2233466866/lnmp
docker run -dit \
-p 80:80 \
-p 443:443 \
-p 3306:3306 \
-p 9000:9000 \
-v /Users/missapp/work/project/docker/www:/www \
-v /Users/missapp/work/project/docker/mysql:/data/mysql \
--privileged=true \
--name=lnmp \
2233466866/lnmp
docker images
docker exec -it lnmp /bin/bash
linux常用命令
tail -f test.php
head
cat
more
less
grep
grep "111" test.php
grep -n "111" test.php
grep -n "111" test.php |wc -l
ps -ef |grep ssh
netstat -anpl |grep 'http'
netstat -apn|grep 8077
find
wc
lsof -i:80
php -i |grep ini
netstat -lptn
ss -ntlp
netstat -tunlp
ifconfig
ip addr
php -i|grep php.ini
history 查看运行的命令记录
ping xxx.com
telnet 192.168.0.1 80
systemctl restart nginx
systemctl restart php-fpm.service
chmod -R 777 ./xxxx
chown -R www:www ./xxx
du -sh ./*
服务器硬件资源信息
内存:free -m
硬盘:df -h
负载:w/top
tar -zcvf 压缩文件名 .tar.gz 被压缩文件名
tar -zxvf 压缩文件名.tar.gz
tar -tf xxx.tar 解压文件
tar -tvf xxx.tar 解压文件并展示信息
zip -r xx.zip ./xxx 压缩 unzip xx.zip 解压
vi /etc/sysconfig/iptables
service iptables restart
xshell文件传输命令
yum -y install lrzsz
rpm -qa|grep lrzsz
rz
sz