linux查看檔案大小
du -h --max-depth=1 echuandan ## 查看檔案大小
linux 批量重命名
rename 's/\\.jpg/.gif/' *.jpg
本地nginx 組態檔
vi /usr/local/etc/nginx/nginx.conf
停止 nginx
sudo nginx -s stop
啟動 nginx
sudo nginx
創建時間的shell指令
date "+%Y-%m-%d"
查看埠被占用情況
lsof -i tcp:port
ps aux | grep nginx
* 查看埠 lsof -i:8080
* 殺死行程 kill 345
* 關閉終端視窗 pkill -9 -t pts/0
* kill -9 強制終止
* ~代表你的/home/用戶命目錄 cd ~/Games 等于 cd /Users/terry/Games
* tldr tee 查看tee的使用方式
* grep -n 'module’ Gulpfile.js 搜索檔案中的”module"
* ls | tee -a who.txt 將螢屏輸出內容寫入到who.txt
CentOS 6.x 和 CentOS 7.x 中 Nginx 的操作命令(啟動/重啟/退出/...)
--------- CentOS 6.x 中 Nginx 的操作命令 ---------
# nginx // 不指定組態檔啟動 Nginx,默認讀取 /etc/nginx/nginx.conf 組態檔,
# nginx -c <組態檔> // 指定組態檔啟動 Nginx ,
# nginx -t // 測驗組態檔是否有語法錯誤,通過這種方式,也就知道了默認組態檔是哪個檔案,
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
# nginx -s reopen // 重啟 Nginx
# nginx -s reload // 重新加載 Nginx 組態檔,然后以優雅的方式重啟 Nginx ,
# nginx -s stop // 強制停止 Nginx 服務
# nginx -s quit // 優雅地停止 Nginx 服務(即處理完所有請求后再停止服務)
--------- CentOS 7.x 中 Nginx 的操作命令 ---------
# systemctl start nginx.service // 啟動 Nginx 服務
# systemctl stop nginx.service // 停止 Nginx 服務
# systemctl restart nginx.service // 重啟 Nginx 服務
# systemctl reload nginx.service // 重新加載 Nginx 組態檔,然后以優雅的方式重啟 Nginx ,
# systemctl status nginx.service // 查看狀態
# systemctl enable nginx.service // 設定開機自啟動
# systemctl disable nginx.service // 停止開機自啟動
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/246635.html
標籤:其他
