Note: bash_profile is completely different from configuration profiles. Learn more about Configuration Profiles in my book: ‘Property Lists, Preferences and Profiles for Apple Administrators’ Note:…
Source: About bash_profile and bashrc on macOS – Scripting OS X
Tag: Terminal
-
About bash_profile and bashrc on macOS – Scripting OS X
-
Repair / Verify Disk Permissions in OS X El Capitan
$ sudo /usr/libexec/repair_packages --verify --standard-pkgs / $ sudo /usr/libexec/repair_packages --repair --standard-pkgs --volume /
-
ProxyChains-NG and OS X El Capitan System Integrity Protection System Integrity Protection
Apple introduces System Integrity Protection (SIP) as a security feature for OS X El Capitan (10.11), which prevent ProxyChains-NG working as before, you have to disable SIP to make it work:
- Reboot your Mac into Recovery Mode by pressing command-R
- Open Terminal and type
csrutil enable --without debug
:
$ csrutil enable --without debug $ csrutil: requesting an unsupported configuration. This is likely to break in the future and leave your machine in an unknown state. $ Successfully enabled System Integrity Protection. Please restart the machine for the changes to take effect.
Just ignore the warnings and then restart your Mac.
-
Export Compact SVG with Sketch
Bohemian Coding – Preferences.
Used to tell Sketch to export compact SVG files. We add some metadata to exported SVG files, to make it easier to re-import them in Sketch. However, if you are sure you won’t import them, you can disable the saving of metadata by running this into your Terminal.app:
$ defaults write com.bohemiancoding.sketch3 exportCompactSVG -bool yes
When this is set to YES, Sketch will not use the name of the layer for the id field of the layer in SVG export:
$ defaults write com.bohemiancoding.sketch3 svgExportSkipAssignIdToLayerName -bool yes
-
How to Batch Delete PNG Screenshots in iPhoto
输入下列命令,替换其中的路径即可:
find /Volumes/Remote HD/Pictures/username/iPhoto Library/Masters/ -name '*.PNG' -type f
注意以上命令不会删除图片,只会将其显示,如需删除,需要在最后添加
-delete
选项,即:find /Volumes/Remote HD/Pictures/username/iPhoto Library/Masters/ -name '*.PNG' -type f -delete
注意!此方法删除不可逆,图片不会进入垃圾桶,而是直接删除。另外此方法同样适用于「批量删除所有 MOV 视频」
-
让 Mac OS X 上的 Mail 总是自动添加 Reply-To 的方法
- 打开 Terminal
- 输入
defaults read com.apple.mail UserHeaders
,回车 - 显示有
The domain/default pair of (com.apple.mail, UserHeaders) does not exist
- 输入
defaults write com.apple.mail UserHeaders '{"Reply-To" = "reply-to@address"; }'
- 禁用此功能
defaults delete com.apple.mail UserHeaders
注意:此设置会忽略 GUI 中的 Reply-To 设置