问题
I am trying to sync a code project between two computers, one running Windows and the other running Ubuntu 12.04. I use Eclipse on both machines, but the .metadata folder produced by Eclipse is causing Eclipse to crash because of OS incompatibilities.
I was wondering if there is a way to tell Dropbox to "ignore this folder" or something like that. Or maybe have it ignore all hidden files.
回答1:
Using the Official Dropbox Command Line Interface (CLI)
PROMPT$ 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.
http://www.dropboxwiki.com/tips-and-tricks/using-the-official-dropbox-command-line-interface-cli
回答2:
Right click on the taskbar icon, select preferences, then the advanced tab and set up selective sync. Enabling advanced view will help, too.
In general, you should consider using a version control system like Subversion, Mercurial or git. You can make use of free hosting services (Assembla, Github, Bitbucket just to name a few) or set up a repository on a USB drive (works very well for personal projects).
回答3:
You can name the file in such a way that Dropbox considers it a temporary file, which will prevent it syncing.
eg. .~myfile.foo
According to their help: https://www.dropbox.com/en/help/145 -
Temporary files
When some applications (such as Microsoft Word, Excel, or PowerPoint) open a file, they will often save a temporary file in the same directory and name it in one of the following ways:
Name begins with ~$ (a tilde and dollar sign) or .~ (a period and tilde)
- Name begins with a tilde and ends in .tmp, such as ~myfile.tmp
- Dropbox does not sync these temporary files on any operating system.
来源:https://stackoverflow.com/questions/12119613/is-there-a-way-to-tell-dropbox-not-to-upload-a-certain-file-eclipse-related