特點:支援read-only,即每次更新檔案都會上傳并重命名。
20GB空間,容量大。
非常友善建立外鍊,共享檔案給他人。
原文:http://help.yandex.com/disk/cli-clients.xml
1. 手動安裝:
32bit下載下傳:
http://repo.yandex.ru/yandex-disk/yandex-disk_latest_i386.deb
安裝:
# dpkg -i yandex-disk_0.1.0.103_i386.deb
2. apt-get安裝
# echo "deb http://repo.yandex.ru/yandex-disk/deb/ stable main" >> /etc/apt/sources.list.d/yandex.list
# apt-get update
# apt-get install yandex-disk
可能需要重新GPG校驗
sudo rpm --import http://repo.yandex.ru/yandex-disk/YANDEX-DISK-KEY.GPG
3. setup
$ yandex-disk setup
是否配置proxy伺服器(有進一步選項),是否開機啟動,賬戶密碼輸入。
4. command
4.1 token
yandex-disk token [-p, --password=PASSWORD] [OPTION] USERNAME [FILE]
登陸密碼儲存,yandex-disk 授權 username [file](授權檔案存儲的目錄,如果沒有的話預設在~/.config/yandex-disk存儲),然後是輸入密碼。
4.2 start
yandex-disk start [OPTION]
開啟守護程序,同步除except-dirs外的所有檔案
4.3 status
yandex-disk status [OPTION]
顯示守護程序的狀态(同步狀态,同步錯誤,同步檔案夾,Disk的總空間)
4.4 stop
$ yandex-disk stop [OPTION]
關閉守護程序
4.5 sync
yandex-disk sync [OPTION]
同步除了exclude-dirs上的排除清單外的所有檔案夾
4.6 publish
yandex-disk publish [OPTION] FILE
擷取釋出一個檔案或檔案夾的一個公共連接配接
4.7 unpublish
yandex-disk unpublish FILE
回收一個釋出的檔案或檔案夾的公共連接配接
5. 外加的一些command
--config=FILE, -c FILE
顯示configuration file,config.cfg用的預設~/.config/yandex-disk中 --dir=DIR, -d DIR
輸入一個本地Disk副本路徑,實際上在setup時候以及輸入了,預設是~/Yandex.Disk --auth=FILE, -a FILE
輸入包含登陸資料檔案,預設檔案是passwd,用token建立的一個檔案~/.config/yandex-disk --exclude-dirs=DIR1,DIR2,...
不同步的檔案夾,如果是總想讓這些檔案不被同步,那麼需要把這個exclude-dirs添加到config.cfg中,為了正常工作,需要把多個排外路徑名用逗号分隔,不含空格 --read-only
禁止在Disk server修改檔案,運作sync隻是同步本地副本,為了避免同步時候的沖突,本地檔案将被重命名,如果--overwrite設定也有效,那麼本地檔案會被overwritten. --overwrite
允許本地修改同步到Disk當同步的時候會overwritten伺服器檔案,配合--read-only使用 --no-daemon, -D
登陸守護程序但不傳回管理平台,在另一個console守護程序必須用指令yandex-disk stop來停止,或者關閉目前的console傳回控制權限。 --help, -h
顯示幫助
--proxy=PARAM
設定proxy server,合法的參數有:
auto-自動(預設)
no- 不使用proxyserver
protocol,address,port,login,password - 手動設定
6.簡單舉例
$ yandex-disk start -c ~/ydconfig/newconfig.cfg # launch daemon and sync with specified configuration file
$ yandex-disk start --exclude-dirs=Foto # do not sync folder 'Foto'
$ yandex-disk sync --read-only # sync folders in 'read-only' mode
$ yandex-disk publish Foto # get a public link to the folder 'Foto'