diff --git a/os/mac/Compression.md b/os/mac/Compression.md index 1a934d95..53af8416 100644 --- a/os/mac/Compression.md +++ b/os/mac/Compression.md @@ -2,7 +2,19 @@ Zip Split Files -https://smallbusiness.chron.com/split-zip-files-os-x-56155.html + Splitting already zip file into 100MB files. +[Source](https://smallbusiness.chron.com/split-zip-files-os-x-56155.html) + +```sh +zip MyArchive.zip --out SplitArchive.zip -s 100m +``` + +## Zip Password protected + + +```sh +zip -er file_name_output /Users/macStudio_Player.txt /Users/no3_5.dmg +``` -> zip MyArchive.zip --out SplitArchive.zip -s 100m \ No newline at end of file +[article | imore](https://www.imore.com/how-create-and-password-protect-zip-file-macos) \ No newline at end of file diff --git a/os/mac/README_mac.md b/os/mac/README_mac.md index e8af95d6..4e0caef3 100644 --- a/os/mac/README_mac.md +++ b/os/mac/README_mac.md @@ -12,6 +12,8 @@ [[disable_gatekeeper]] +[disk_utility](disk_utility.md) + [fresh_install](fresh_install.md) [[hidden_files]] diff --git a/os/mac/codesign_app.md b/os/mac/codesign_app.md index f3b238d4..842e237d 100644 --- a/os/mac/codesign_app.md +++ b/os/mac/codesign_app.md @@ -7,6 +7,19 @@ Apple removed app's certificate, so the app will crash. The current solution is Run in Terminal -> codesign --force --deep --sign - /Applications/name.app +```sh +codesign --force --deep --sign - /Applications/name.app -You could use 'sudo' for escalated permissions. \ No newline at end of file +``` +You could use 'sudo' for escalated permissions. + + +## Cannot Open the program + +If the error “Cannot open the program” appears, enter in the terminal (the application should be in the “Programs” folder): + +```sh +xattr -cr /Applications/AppName.app && codesign --force --deep --sign - /Applications/AppName.app +``` + +The update has been completed. Please uninstall and reinstall completely. \ No newline at end of file diff --git a/os/mac/disk_utility.md b/os/mac/disk_utility.md new file mode 100644 index 00000000..054636c0 --- /dev/null +++ b/os/mac/disk_utility.md @@ -0,0 +1,78 @@ + + +## NTFS + + +Mounting NTFS + +Utilizing app called [Mounty](https://www.mounty.app/) + +```sh +brew install --cask macfuse +brew install gromgit/fuse/ntfs-3g-mac +brew install --cask mounty +``` + +Had to enable / disable system extensions for macOS. + + +## Storage + + +You can check why your macOS is low on storage. + +Few good links about macOS caching about everything in its system directory. +One single Xcode installation can go up to 60gigs of storage. This is pretty bad for apple hardware where Memory costs like Caviar be it Volatile (RAM, L1.*x Cache) or Non Volatile (Disk / SSD / ROM). + +Luckily apple provides us two options + +- One is there System Preferences -> Storage with some option to delete unused storage and cleanup extra support libraries. +- It tries to upsell iCloud Storage packages to offload mac / device storage to Cloud. Seamless integration or anti competitive - forced planned obsolescence type of stuff. You can be the judge. + + +I recommend few things + +- [Daisy disk](https://daisydiskapp.com/) +- [Clean my Mac](os/mac/disk_utility#Clean%20my%20Mac) +- Terminal commands +- Disable Time Machine +- Delete old iOS / iPhone backups +- Enable [hidden_files](hidden_files.md) + +### Support Files + +Delete Phone old OS device support files, for example if you had an iOS / iPadOS / Apple TV / Vision Pro or any apple development device on a specific OS and then you upgraded from iOS 16.4 -> iOS 17.4 then Xcode or macOS has old iOS 16.4 device support files for Obj-C / Swift Headers or just for debugging symbols. That's why every time you connect a new device to xcode -> it performs this process of `Preparring for Device support` + +Turns out if you have like 4 - 7 development devices for one Xcode the storage support files goes up to 20Gigs+ usually each device + OS combo accounting for 2 - 4 gigs. +You can delete them in `Apple -> System preferences app -> Developer -> Delete Device Support Files` + + +### Terminal Commands + +`du` (disk usage) and `df` (disk free) commands + + +```sh +df -h | grep Gi + +# Output +# /System/Volumes/Data 124Gigs +``` + +This grabs space occupied by `Gigs` and then you can sort that data + +```sh +du -h /System/Volumes/Data | grep "G\t" | sort +``` + +and if you want breakdown of the folders / directory use + +```sh +du -h -d 1 +``` + +### Clean my Mac + + [Clean my Mac - MacPaw](https://cleanmymac.com/) + Just make sure to disable everything else like analytics, full disk scanning, protection stuff etc & auto login. I usually use this app once in 30 days. + \ No newline at end of file diff --git a/os/mac/mac_commands.md b/os/mac/mac_commands.md index 64fd810e..dd3d8d28 100644 --- a/os/mac/mac_commands.md +++ b/os/mac/mac_commands.md @@ -18,6 +18,12 @@ For checking your reboots last reboot ``` +## Keeping mac Alive + +```sh +caffeinate +``` + ## Checking Mac Application Bundle ID diff --git a/os/mac/mac_os_quirks.md b/os/mac/mac_os_quirks.md index cdc31239..fac3bcf5 100644 --- a/os/mac/mac_os_quirks.md +++ b/os/mac/mac_os_quirks.md @@ -38,4 +38,23 @@ Enter your password to allow this. sudo chown -R $USER /Applications/Slack.app ``` -Or if you \ No newline at end of file +Or if you + + + +## Search with Default browser + + +Add automator / workflow and set it in default browser +[Stack Exchange | MacOS - system preferences](https://apple.stackexchange.com/questions/10999/search-in-google-always-open-safari-instead-of-default-browser) + + +Create a workflow for automator + +[super user | create a shortcut for search with google](https://superuser.com/questions/369934/mac-os-x-lion-chrome-shortcut-for-search-with-google) + +maybe try this app but i didn't fully config it to check whether it works perfectly +[Velja macOS app](https://apps.apple.com/ca/app/velja/id1607635845?mt=12) + +Location of Automator script. +Automator Quick Actions are saved into /Users/username/Library/Services. By default, Workflows are saved in the **Workflows folder in the local library** \ No newline at end of file