1、nginx常用命令
# 啓動、停止、重載、查看狀態命令
[root@dzjs-app1 ~]# systemctl start nginx.service
[root@dzjs-app1 ~]# systemctl stop nginx.service
[root@dzjs-app1 ~]# systemctl reload nginx.service
[root@dzjs-app1 ~]# systemctl status nginx.service
2、查找文件
- 1 whereis命令
# 使用 whereis 命令
[root@dzjs-app1 ~]# whereis nginx
- 2 find命令
# 使用 find 命令
[root@dzjs-app1 ~]# find / -name nginx
3、複製文件
- 1 複製文件
# 複製文件:cp 文件名 複製目的地文件夾名
[root@dzjs-app1 ~]# cp cs.txt /opt/text/
- 2 複製文件夾
# 複製文件夾:cp 文件夾名 複製目的地文件名
[root@dzjs-app1 ~]# cp cs /opt/text/
4、移動文件
- 1 移動文件
# 移動文件:mv 文件名 移動目的地文件名
[root@dzjs-app1 ~]# mv cs.txt /opt/text/
- 2 移動文件夾
# 移動文件:mv -r 文件夾名 移動目的地文件名
# -r 意思是循環迭代文件夾內的文件
[root@dzjs-app1 ~]# mv -r cs /opt/text/
- 3 重命名文件
# 重命名文件:mv 文件名 修改後的文件名
# 示例:mv oldfilename newfilename (oldfilename爲舊文件名,newfilename爲新文件名)
[root@dzjs-app1 ~]# mv cs.txt cs01.txt