スポンサード リンク
Ubuntu Server 16.04にDropboxをインストールする。 このサーバにはXをインストールしていない,いわゆるヘッドレスなサーバだ。
まずはCLI用dorpboxdをインストールする。 dropboxdを実行すると認証用のURLが表示されるので,アクセスして有効化する。 有効化後はdropboxdをKILLして良い。
$ cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
$ $HOME/.dropbox-dist/dropboxd
次に管理用コマンドをdebファイルからインストールする。
$ wget -O dropbox.deb 'https://www.dropbox.com/download?dl=packages/debian/dropbox_2015.10.28_amd64.deb'
$ sudo dpkg -i dropbox.deb
$ rm -f dropbox.deb
これでdropboxコマンドで管理できるようになる。 dropbox start だけはしておこう。 昔はdropbox.pyを使っていた記憶があるが,今はもうdropboxコマンドだけで十分につかえるようだ。
$ dropbox -h
Dropbox command-line interface
commands:
Note: use dropbox help <command> to view usage for a specific command.
status get current status of the dropboxd
throttle set bandwidth limits for Dropbox
help provide help
puburl get public url of a file in your dropbox's public folder
stop stop dropboxd
running return whether dropbox is running
start start dropboxd
filestatus get current sync status of one or more files
ls list directory contents with current sync status
autostart automatically start dropbox at login
exclude ignores/excludes a directory from syncing
lansync enables or disables LAN sync
sharelink get a shared link for a file in your dropbox
proxy set proxy settings for Dropbox
Comments !