Here is a quick solution to remove conflicted copies:
#!/usr/bin/env bash # just print find . | grep "conflicted copy 2015" | while read i; do echo $i; done # print and DELETE #find . | grep "conflicted copy 2015" | while read i; do echo $i; /bin/rm "$i"; done
Put it in your
~/Dropbox folder and launch it. First it will just print the conflicted copies. If you want to get rid of these files (verify!), then uncomment the last line.
The string “2015” is added to narrow the produced list. But normally “conflicted copy” should be enough.
I wanted to test the status of my Dropbox client from the terminal. Actually, I wanted to write a script that executes an action when my Dropbox folder is fully synced. So I wanted to test the status if it’s “working” or “synced”.
I found the solution here. It turned out that Dropbox has an official command-line script that can do this and much more. First, get it:
wget -O ~/dropbox.py https://www.dropbox.com/download?dl=packages/dropbox.py chmod u+x ~/dropbox.py ~/dropbox.py status
This is a Python script, written in Python 2, thus I modified the first line to be “
This script can do several things for you:
$ dropbox.py Dropbox command-line interface commands: Note: use dropbox help 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
Some years ago I wrote a simple script to get the public URL of a file in my Dropbox folder. This script can do that too with the “puburl” command.
If you have Dropbox installed on several machines, sometimes one of the clients litter your Dropbox folder with conflicted copies. Their number can be up to hundred(s). How to get rid of them?
First, locate the conflicted copies:
$ cd ~/Dropbox # or wherever your Dropbox folder is $ find . | grep "conflicted copy"
Investigate the result and make sure they can be deleted.
# one more check: $ find . | grep "conflicted copy" | while read i; do echo $i; done # if you are absolutely sure, delete them: $ find . | grep "conflicted copy" | while read i; do echo $i; \rm "$i"; done
Notice that “
$i” is between quotes since these filenames contain spaces.
You want to install Dropbox on Manjaro.
Visit the official download page and follow the instructions under the section “Install Dropbox via command line”. Everything is explained there.
Later, Dropbox may complain that it cannot monitor the filesystem correctly. It happens when you have lots and lots of files in your Dropbox folder. Here is the fix:
# open this file for edit: $ sudo vim /etc/sysctl.d/99-sysctl.conf # and add this line: fs.inotify.max_user_watches = 100000 # then reload the kernel parameters: sudo sysctl --system
Notice that this file’s location differs from Ubuntu’s.
This tip is from here.
My Dropbox folder was at 98.5%, so it was time to do some cleanup. Which directories are the largest? Which files are the largest?
alias top10dirs='du -hsx * | sort -rh | head -10' alias top10files='find . -type f -print0 | du -h --files0-from=- | sort -hr | head -n 10'
The first one shows the top 10 largest directories, while the second one prints the top 10 largest files. Directory and file sizes are shown in a human-readable format.
$ top10dirs 60M 20090629-deploy 60M 20090327-deploy 56M kgm 55M exist-deploy-v3-20100710 55M exist-deploy-v3-20100521 ... ============================== $ top10files 60M ./20090629-deploy/20090629-deploy.zip 60M ./20090327-deploy/20090327-deploy.zip 55M ./exist-deploy-v3-20100710/exist-deploy-v3-20100710.zip 55M ./exist-deploy-v3-20100521/exist-deploy-v3-20100521.zip 49M ./exist-deploy-v3-20100409/exist-deploy-v3-20100409.zip ...
My primary operating system is Linux but since I need to work with Powerpoint too, I installed Windows 7 in VirtualBox. Under Windows I prepare my presentations but I want them synchronized on all my machines. For the synchronization I was using Dropbox.
I had Dropbox on Linux (host machine) and on Windows (guest machine) too. When I edited a file under Windows, Dropbox synced it to the Linux host too (the Windows client uploads it to the cloud; the Linux client downloads it from the cloud). It worked fine, though it was not not optimal. If I didn’t use the Windows guest for a long time, then after a boot I had to wait some time till Dropbox synced everything and I could start working only after that.
However, something happened to the Windows Dropbox client recently. Maybe it’s a bug, I don’t know, but the Dropbox client in my Windows guest became terribly slow. It keeps syncing but it doesn’t upload the changes, or I need to wait an hour or so to upload a file 1 MB of size. This is ridiculous and unacceptable. Note that I dind’t experience similar issues with the Linux client.
How to have a synchronized folder between a Linux host and a Windows guest without a Dropbox client on the guest?
First I made sure that my Dropbox folders were synced between the host and the guest. After this I uninstalled Dropbox on Windows and removed the
C:\Dropbox folder entirely. Since it was synced with the Linux host, I had an exact copy of the
Dropbox folder on Linux. Then shut down the Windows guest.
Here (http://www.maketecheasier.com/share-files-in-virtualbox-between-vista-guest-ubuntu-host) you can find an excellent post on how to set up a shared folder between a Linux host and a Windows guest. On the Linux host I shared my Dropbox folder (
$HOME/Dropbox) that appears now as a new drive in the Windows guest (
G:\ in my case). Now, if I modify something under Windows, it will be visible immediately in the Linux file system that the Dropbox client on Linux will notice and sync.
With this I could solve two problems. First, when I boot up the Windows guest, I don’t need to wait for the Dropbox client to sync. Second, if I change something under Windows, it is still synced to the Dropbox cloud, though I have no Dropbox client on Windows anymore.