差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

Both sides previous revision 前次修改
下次修改
前次修改
it:mac:book:storage [2020/01/03 10:21]
ghsrobert [Baseqi+microSD] 掛載到不同的點
it:mac:book:storage [2020/10/01 21:16] (目前版本)
ghsrobert [Baseqi+microSD] Exhaust 自動執行 bindfs command
行 205: 行 205:
       * /^20200102^/ 開始用 symlink 來將 ~/Downloads 指向 SD 卡上,但並沒有很成功       * /^20200102^/ 開始用 symlink 來將 ~/Downloads 指向 SD 卡上,但並沒有很成功
     * [[https://apple.stackexchange.com/questions/97920/mount-folder-as-a-volume-osx|macos - Mount folder as a volume (OSX) - Ask Different]] 這邊有教用 bindfs → 馬上試試 ← 不支援 macOS 10.11 :(     * [[https://apple.stackexchange.com/questions/97920/mount-folder-as-a-volume-osx|macos - Mount folder as a volume (OSX) - Ask Different]] 這邊有教用 bindfs → 馬上試試 ← 不支援 macOS 10.11 :(
 +      * 照[[https://apple.stackexchange.com/questions/197029/how-do-you-mount-bind-a-local-directory|這裡]]說的,從 FUSE 官網下載後自行安裝(原來我之前裝過了,但比較舊,所以這次就只是更新),然後再次 ''$ brew install bindfs'' → 裝好 bindfs 了!
 +      * 然後順利試著<code bash>
 +~$ mkdir test
 +~$ bindfs /Volume/SD/Downloads ~/test
 +</code>有顯示在 command line 中,但 Finder 中卻顯示為一個 OSX FUSE 卷宗,而非「test」資料夾耶
 +        * ↑研究 OSX FUSE 的 wiki,應該會有解吧
 +        * 加 ''-o local'' → 仍是一個 OSX FUSE 卷宗
 +        * /^20200106^/ 後來改用 ''-o volname=<磁碟名稱> -o volicon=<ICNS 格式圖示檔路徑>'' 的選項/,(不用 ''-o local'' 就不會顯示在「裝置」中,避免不慎卸載),/,這樣掛上的卷宗就比較像樣啦!
 +        * <div tip>把 bindfs 指令包成 app,一鍵執行:
 +/^20201001^/ 用上面的 bindfs 法,後來我做成一個 mountSD.command 放在桌面上,內容類似 ++++bash script|<div><code bash>#!/bin/bash
 +cd ~
 +bindfs -o volname=Downloads -o volicon=/Volumes/SD/Dropbox/images/logos\ \&\ icons/Mcdo-Design-Smooth-Leopard-Downloads-Folder-Blue.icns /Volumes/SD/Downloads/ ~/Downloads
 +bindfs -o volname=Music -o volicon=/Volumes/SD/Dropbox/images/logos\ \&\ icons/music\ folder.icns /Volumes/SD/Music/ ~/Music</code></div>++++
 +每次開機時第一步就執行,來掛載一個 Download、一個 Music
 +  * 但缺點是 .command 檔無法透過 Exhaust 自動執行 ∴每次都要先執行那個 .command 檔,然後再執行 Exhaust
 +  * 好幾個月以來一直想把 script「應用程式化」。隔了好幾個月,終於在昨天,用 [[https://sveinbjorn.org/platypus|Platyrus]] 這隻鴨嘴獸,順利包好了一個偽 app 啦!<<讚!>>
 +    * 但要注意,包在裡面的 script,環境變數大概與一般終端機中不同 ∴直接執行 bindfs 會找不到 command。透過<code bash>$ command -v <某個 command></code>(([[https://www.cyberciti.biz/faq/bash-file-command-not-found-how-to-install-file/|bash: file: command not found. How to install file - nixCraft]]))找到 bindfs binary 的所在路徑 /usr/local/bin,就把那個路徑放到 Platyrus 所包的 script 中的 bindfs 前面,這樣才能正確執行哦
 +    * 另外,Platyrus 的輸出介面「Text Window」可權充腳本的執行 output 或 verbose 區,除錯時可善加利用
 +</div>
 +      * 據說 OSXFUSE 缺點是沒有 inotify,無法監控磁碟變動,這就只好用用看結果如何了
     * 用 ''diskutil mount -mountPoint'' 呢?(([[https://apple.stackexchange.com/questions/242376/seeking-a-clean-way-to-mount-a-directory-on-one-hfs-drive-as-a-directory-on-ano|macos - Seeking a clean way to mount a directory on one HFS+ drive as a directory on another such drive on same machine - Ask Different]]))     * 用 ''diskutil mount -mountPoint'' 呢?(([[https://apple.stackexchange.com/questions/242376/seeking-a-clean-way-to-mount-a-directory-on-one-hfs-drive-as-a-directory-on-ano|macos - Seeking a clean way to mount a directory on one HFS+ drive as a directory on another such drive on same machine - Ask Different]]))
   * /^20191229^/ 修改記憶卡圖示 ✔   * /^20191229^/ 修改記憶卡圖示 ✔
行 210: 行 230:
   * /^20191230^/ 考慮把 ~/Dropbox 也放到卡上   * /^20191230^/ 考慮把 ~/Dropbox 也放到卡上
     * [[https://approductive.wordpress.com/2016/06/04/using-a-micro-sd-card-on-a-macbook-for-dropbox/|Using a Micro SD Card on a MacBook for Dropbox | approductive]]     * [[https://approductive.wordpress.com/2016/06/04/using-a-micro-sd-card-on-a-macbook-for-dropbox/|Using a Micro SD Card on a MacBook for Dropbox | approductive]]
 +    * /^20200109^/ 今天照 [[https://help.dropbox.com/zh-tw/installs-integrations/desktop/move-dropbox-folder|Dropbox 官方說明]],用 Dropbox 自己的機制來搬移 ~/Dropbox 到卡上囉~\\ → 未知錯誤!<<怒>>
 +    * 只好手動:
 +      - 暫停 Dropbox 同步
 +      - 把 ~/Dropbox 複製到 SD 上((有用到 [[https://github.com/pilisir/macOS_merge_copy|Merge Copy]] 服務來確保完整複製
 +      - 解除帳號連結後,重新連結帳號,並按 ''進階設定'',把 Dropbox 的位置改到 SD 上
 +      - 開始重新同步 ✔ ;)
 +      - 把舊的 Dropbox 資料夾刪了!
   * Alfred 檔案搜尋 ✔ ☞ [[https://www.alfredforum.com/topic/10882-search-scope-and-search-speed/|Search Scope and Search Speed - Discussion & Help - Alfred App Community Forum]]   * Alfred 檔案搜尋 ✔ ☞ [[https://www.alfredforum.com/topic/10882-search-scope-and-search-speed/|Search Scope and Search Speed - Discussion & Help - Alfred App Community Forum]]
 +  * [[https://docs.google.com/spreadsheets/d/1rJr2_5qqdo20BMpwAUpzFdACGNGQEr08eORMCjab9U0/edit#gid=0|自己管制各資料夾搬到 SD 卡上的進度]]
 +  * /^20200109^/ 買 SD 卡的初步目標達成!今天把 Dropbox 也移過去以後,SSD 的剩餘空間來到 31 GB。另外,確認暫時沒有要用 hibernate 模式,所以 SD 卡可以一直掛著不用卸載,不怕睡眠,那麼 Parallels Desktop 虛擬機也可以放上面了。接下來又有一些 SSD 空間可供應用程式運用啦~
  • 上一次變更: 2020/01/03 10:21
  • ghsrobert