在 macOS 中如何剪切文件 All In One
在 macOS 中如何剪切文件 All In One
macOS 剪切文件
复制粘贴
- 
command + C 复制 
- 
command + V 粘贴 
删除 & 粘贴
在 Windows中
Ctrl+X是剪切,MacOS中没有剪切,但是有一个快捷键组合和剪切类似:
Command + C
Command + Option + V
- 
使用 Command+C复制后,在某个目录下按下Command+Option+V即可把原来的文件删除,并在当前目录下创建这些文件
- 
直接在两个 Finder窗口中拖拽文件即可 ✅
demos

macOS & hosts
# vim
$ vim /usr/local/etc/nginx/nginx.conf
VS Code
# OR
$ cd /usr/local/etc/nginx
# vscode
$ code .
hosts
$ cd /etc/hosts
# vscode
$ code .
Linux 如何一次切换到 home 目录
相对路径 & 绝对路径
cd ./ 代表当前目录
cd ../ 代表上级目录
cd ~ 当前用户的根目录
cd / 系统的根目录
$ cd ~
$ pwd
# /Users/xgqfrms-mbp
$ cd / 
$ ls
# Applications Users cores  home  sbin var  Library Volumes dev opt  tmp System bin  etc private usr
#  etc, usr, home, Users
# 切换到 etc 并打开 hosts 文件
$ cd ../../etc
$ cd /etc && cat hosts
$ cd /etc && code hosts
$ cd /etc && sudo vim hosts
# :wq!
# php, nginx (created: 2020.08.08)
127.0.0.1 www.webfullstack.xyz 

Nginx
# 使用 brew 安装(如果没有 brew 命令,需要自行安装 brew)
$ brew install nginx
$ nginx -h
# 查看 port 占用情况
$ lsof -Pi | grep LISTEN
# 重启 nginx
$ nginx -s reload
修改 nginx.conf 文件,添加如下配置
修改后要重启 nginx
$ cat /usr/local/etc/nginx/nginx.conf
$ vim /usr/local/etc/nginx/nginx.conf
- VS Code
$ cd /usr/local/etc/nginx
$ code ./

- vim
$ vim

 (🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!
refs
©xgqfrms 2012-2021
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/10412565.html
未经授权禁止转载,违者必究!

 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号