MAC OSX的一些指令和路径信息

留着查询备用好了

指令:
1、apache相关
sudo apachectl start //启动
sudo apachectl stop //停止
sudo apachectl -k restart //重新启动
apachectl configtest //检查配置文件语法
httpd -v //查看版本信息

2、android avd虚拟机
android-sdk/tools/android create avd -f -n avd-name -t 1 //创建虚拟机
android-sdk/tools/emulator -avd avd-name //运行虚拟机
android-sdk/platform-tools/adb install a.apk //安装app
android-sdk/platform-tools/adb rm /data/system/gesture.key //消除手势密码

3、清除DNS缓存
sudo killall -HUP mDNSResponder && echo macOS DNS Cache Reset

4、重置Finder视图
sudo find / -name ".DS_Store" -exec rm {} \;

5、打开任意来源安装应用
sudo spctl --master-disable

6、不安装Xcode,只安装Xcode command line tools
xcode-select --install

7、安装homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

8、流量监听
lsof -iTCP -sTCP:LISTEN

9、查看本机对外IP地址,任一命令
curl api.ipify.org
​curl ipinfo.io/ip
curl ident.me
​curl bot.whatismyipaddress.com

10、建立MAC APP的图标集文件

在icon.iconset目录中保存以下尺寸的文件:

icon_16x16.png
icon_16x16@2x.png
icon_32x32.png
icon_32x32@2x.png
icon_128x128.png
icon_128x128@2x.png
icon_256x256.png
icon_256x256@2x.png
icon_512x512.png
icon_512x512@2x.png

​iconutil -c icns icon.iconset

11、安装node.js和npm

brew install node

查看node版本

node -v

查看npm版本

​​npm -v

生成package.json文件

init

12、安装electron

npm install -g electron

运行electron应用

npm start

安装electron packager

npm install electron-packager -g

封装当前路径为electron应用,指定MAC app图标

electron-packager . --icon="./icon.icns"

路径
1、Mail
/Users/yourname/Library/Mail

2、Onenote
/Users/yourname/Library/Containers/com.microsoft.onenote.mac/Data/Library/Application Support/Microsoft User Data/OneNote/15.0

3、Screen Saver
/Library/Screen Savers

4、Wallpapers
/Library/Desktop Pictures

5、Quicklook plugins
/Library/QuickLook

6、Desktop Widgets
/Library/Widgets
/Users/yourname/Library/Widgets

7、OmniGraffle Stencils
/Users/yourname/Library/Containers/com.omnigroup.OmniGraffle7/Data/Library/Application Support/The Omni Group/OmniGraffle/Stencils/

8、Office Templates
/Users/⁨yourname/⁨Library⁩/⁨Group Containers⁩/UBF8T346G9.Office⁩/⁨User Content⁩/Templates

9、Voice memos
/Users/⁨yourname/Library/Application Support/com.apple.voicememos/Recordings

10、微信缓存目录
/Library/Containers/com.tencent.xinWeChat/Data/Library/Application Support/com.tencent.xinWeChat/
类似于/2.0b4.0.9/一长串数字 + 英文/Message/MessageTemp

【 阅读次数:409 】