如何从命令行通过 Linux 中的 Dropbox 选择性同步功能*包含*文件夹?

Pys*_*sis 17 linux synchronization command-line-interface dropbox

在另一个用户提出这个问题之后:Linux 服务器上的 Dropbox - 如何包含/排除文件夹?

执行其他问题和答案中列出的一些步骤后,我的图标仍然无法正常工作:

编辑:如果有人在阅读这篇文章时想知道,我可以通过以下链接最终显示我的图标:

对于想要从命令行执行此操作的任何人,该问题仍然有效。

有一个排除的答案,但没有一个包含的答案。有没有办法实现这一目标?

我看到dropbox命令的帮助文本中列出了前一个命令,但没有任何可以帮助我包含的命令。

有谁知道如何实现这一目标?

这是我看到的当前帮助文本:

Dropbox command-line interface  

commands:  

Note: use dropbox help <command> to view usage for a specific command.  

 status       get current status of the dropboxd  
 help         provide help  
 puburl       get public url of a file in your dropbox  
 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  
Run Code Online (Sandbox Code Playgroud)

我还发现了一些官方 Dropbox 帮助文档,奇怪的是,这些文档也只提到了排除文件,而没有包括 Dropbox 文件夹中当前未同步的其他文件。

und*_*und 26

排除所有文件/文件夹:

  • cd 到您的保管箱文件夹(通常为cd ~/Dropbox
  • 然后输入~/bin/dropbox.py exclude add *这将排除您的保管箱文件夹中的所有内容进行同步。(小心!这将删除您同步的所有文件
  • 然后,如果要开始同步文件夹“dir”,请键入 ~/bin/dropbox.py exclude remove dir

取自 http://www.dropboxwiki.com/tips-and-tricks/using-the-official-dropbox-command-line-interface-cli#comment-1778553228

  • 这当然会删除您同步的所有文件(因为默认情况下它是所有文件),然后重新添加一个目录并重新下载它 - 请注意.. (4认同)
  • 排除时使用`~/Dropbox/*` 而不是`*`。 (2认同)
  • 如何防止新创建的文件夹和文件与 Dropbox 同步 (2认同)