大网数据广告活动
服务器运维问答

How can I *include* folders through Dropbox's selective sync feature in Linux, from the command line?

· 52CE 我爱测

After another user asked this question: Dropbox on linux server - how to include/exclude folders? My icon is still not working after performing some of the steps listed in other questions and answers: https://askubuntu.com/questi…

问题原文

原帖链接 · Pysis · CC BY-SA 3.0

After another user asked this question: Dropbox on linux server - how to include/exclude folders?

My icon is still not working after performing some of the steps listed in other questions and answers:

Edit: In case anyone was wondering while reading this post, I was able to get my icon to show up finally by following these links:

The question should still be valid for anyone that wants to do this from the command line.

There was an answer for excluding, but not one for including. Is there any way to achieve this?

I see the former command listed in the dropbox command's help text, but not anything that could help me with including.

Does anybody know how to achieve this?

Here is the current help text that I see:

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  

I also found some official Dropbox help documentation that also strangely only mentions excluding files, without including others from the Dropbox folder that are not currently synced.

已采纳解答

原帖链接 · devunder · CC BY-SA 4.0

To exclude all files/folders:

  • cd to your dropbox folder (usually cd ~/Dropbox)
  • then type ~/bin/dropbox.py exclude add * This will exclude everything in your dropbox folder from syncing. (Be careful! This will remove all the files that you synced)
  • Then, if you want to start syncing the folder "dir", type ~/bin/dropbox.py exclude remove dir

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

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2015-08-05)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。