Web-Server

Linux 伺服器上的 Dropbox - 如何包含/排除文件夾?

  • April 23, 2020

使用 Dropbox GUI,可以專門控制要同步的文件夾。這也可以從命令行以某種方式完成嗎?

背景:我正在嘗試在此處給出的 linux 伺服器上安裝 Dropbox 的解決方案,它似乎工作正常: http ://ubuntuservergui.com/ubuntu-server-guide/install-dropbox-ubuntu-server

官方的 Dropbox CLI 有一個排除選項

在 Linux 上,Dropbox 有一個客戶端 ( dropbox) 和一個守護程序 ( dropboxd)。

客戶端有exclude命令,您可以使用它來排除目錄。例如,要從 Dropbox 中排除 node_modules,您可以輸入dropbox exclude add ./node_modules

dropbox help exclude將列印幫助資訊:

dropbox exclude [list]
dropbox exclude add [DIRECTORY] [DIRECTORY] ...
dropbox exclude remove [DIRECTORY] [DIRECTORY] ...

"list" prints a list of directories currently excluded from syncing.
"add" adds one or more directories to the exclusion list, then resynchronizes Dropbox.
"remove" removes one or more directories from the exclusion list, then resynchronizes Dropbox.
With no arguments, executes "list".
Any specified path must be within Dropbox.

引用自:https://serverfault.com/questions/284238