Search this site
Embedded Files
Skip to main content
Skip to navigation
Cory Chu
Home
CV
Physics
Physics Books
Gravitational Waves
Cosmology
Computer
Programming
CheatSheet
Linux / Unix
macOS
Cloud
Art
Filmmaking
Equipment
Softwares
Graphic Design
Blog
Docs
Misc
Cory Chu
Home
CV
Physics
Physics Books
Gravitational Waves
Cosmology
Computer
Programming
CheatSheet
Linux / Unix
macOS
Cloud
Art
Filmmaking
Equipment
Softwares
Graphic Design
Blog
Docs
Misc
More
Home
CV
Physics
Physics Books
Gravitational Waves
Cosmology
Computer
Programming
CheatSheet
Linux / Unix
macOS
Cloud
Art
Filmmaking
Equipment
Softwares
Graphic Design
Blog
Docs
Misc
macOS
Table of Contents
Table of Contents
Working in Command-Line
Startup Items
Make Bootable Media
MacPort
Backup to Disk Image
Find
Enable Spolight indexing for Google Drive (might not work)
Pkg - Installer
Working in Command-Line
Startup Items
1) /Library/LaunchAgents/*
2) System Preferences > Users & Groups > Login Items
Make Bootable Media
$ diskutil list
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: Apple_partition_scheme *15.6 GB disk2
1: Apple_partition_map 4.1 KB disk2s1
2: Apple_HFS 2.4 MB disk2s2
$ diskutil unmountDisk /dev/disk2
$ dd if=ubuntu.iso |pv |sudo dd of=/dev/rdisk2 bs=1m
# Use rdisk2 instead of disk2 for better performance
MacPort
$ sudo port uninstall inactive
$ port echo leaves
$ sudo port uninstall leaves
Backup to Disk Image
$ sudo dd if=/dev/rdisk2s2 bs=1m |pv |gzip > disk2s2.img.gz
$ sudo gzip -dc disk2s2.img.gz |pv |sudo dd of=/dev/sda bs=1m
Find
$ find . -name ".DS_Store" -exec rm {} \;
# Fix premission from NTFS
$ chflags -R nouchg .
$ find . -type d -perm 777 -exec chmod 755 {} \;
$ find . -type f -perm 777 -exec chmod 644 {} \;
Enable Spolight indexing for Google Drive (might not work)
# Enable
$ mdutil /Volumes/GoogleDrive/ -i on
# Disable
$ mdutil /Volumes/GoogleDrive/ -i off
# Check
$ mdutil /Volumes/GoogleDrive/ -s
Pkg - Installer
Reference:
https://www.funkyspacemonkey.com/how-to-open-pkg-files-to-investigate-what-will-be-installed-on-your-mac
# Check Content
$ pkgutil --payload-files xxx.pkg
# Expand Content
$ pkgutil --expand xxx.pkg ooo
# Browse the content in ooo folder (You may find Bom file)
$ lsbom Bom
Google Sites
Report abuse
Page details
Page updated
Google Sites
Report abuse