17
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

mac iCloudフォルダパス| ターミナルコマンドでiCloudファイルへ移動する方法

Last updated at Posted at 2018-12-01

Screen Shot 2018-12-02 at 00.37.16 edited by Sketch .png

#背景

コマンドでiCloudファイルに簡単に移動できずハマりました。
たぶんmacユーザーは一度はハマるであろうポイントなので 覚えておいた方が良いです。

#環境
mac os - 10.13.6 High Sierra

#iCloud フォルダ Path

/Users/自身のユーザーネーム/Library/Mobile Documents/com~apple~CloudDocs/

なぜかシステム上では iCloud というフォルダ名ではないので 紛らわしいです。
Screen Shot 2018-12-01 at 23.53.20.png

#コマンドでiCloudファイルへ移動する方法

例 )iCloud直下のWebフォルダに移動したい
Screen Shot 2018-12-01 at 23.55.32.png

pwd コマンド - 現在地確認

$ pwd
/Users/think-a-lot

cd コマンド - 上記フォルダパスをコピペするが、そのままでは何故か無理。

「 No such file or directory 」と言われ拒否される。

$ cd /Users/think-a-lot/Library/Mobile Documents/com~apple~CloudDocs/Web
-bash: cd: /Users/think-a-lot/Library/Mobile: No such file or directory

cd コマンド - Mobile と Documentsのスペースに \ を入れて再度実行

今度は「 No such file or directory 」と言われない。

$ cd /Users/think-a-lot/Library/Mobile\ Documents/com~apple~CloudDocs/Web

/Users/think-a-lot/Library/Mobile Documents/com~apple~CloudDocs/Web
  ↓ \ を手動で入れる。
/Users/think-a-lot/Library/Mobile\ Documents/com~apple~CloudDocs/Web

\ = option + ¥

##pwd コマンド - 移動場所を確認

$ pwd
/Users/think-a-lot/Library/Mobile Documents/com~apple~CloudDocs/Web

上手く行きましたでしょうか?
これで無事 移動成功です!
何故かコマンド上でも \ は表示されない点が分かりづらいですね。
以上となります。


17
17
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
17
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?