Does UbuntuOne work when files are moved using the terminal?

Asked by Ryan Maki

This is anecdotal, so I wanted to ask a question about it. Does U1 sync file deletions or moves when they are made on the command line? I've deleted some files more than once with `rm -f blah` in gnome-terminal only to have the 'blah' file re-appear the next time I log on.

This was happening for several days until I finally tried deleting the files from Gnome. As soon as I deleted the file in the GUI the U1 icon in the notification area spun for a bit and the files have been gone for several reboots.

This lead me to wonder if U1 receives notifications when files are deleted with `rm -f` or if I'll have to perform these updates in Gnome (even if it's just during the beta because this is 'known behaviour').

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu One Client Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Elliot Murphy (statik) said :
#1

Hi Ryan,

File activity of any kind is detected the same way, regardless of whether the files were manipulated via the command line, via a program, or via Nautilus. If the sync-daemon is running, then inotify is used to collect file change events. If changes are made while sync-daemon is not running, the next time sync-daemon is started it does a local rescan and compares what it finds with what it had last time it runs.

I believe we have an open bug about deleted files incorrectly coming back, and there has been some code going through review in the last 24 hours about solving a problem we had distinguishing empty files from files that had not yet been synced, which is partially related.

Feel free to file bugs on any behavior you notice which is not obviously correct, I'd much rather have some duplicate bugs than miss fixing something. And thanks for your thoughtful testing of the system!

Revision history for this message
Ryan Maki (ryan.maki) said :
#2

I know the bare basics of inotify, so I did expect files deleted with `rm -f` to be synchronized, but they aren't getting deleted from my home machine when I delete them at work. I don't have a test case at the moment, but I'll keep my eyes open and try to come up with one.

Basically, I've been watching the U1 notification applet. When I save a file in gvim it immediately kicks into motion and then shortly gvim gripes at me that the "file was updated" and I reload it. However, in the same folder when I have deleted old cruft files from the gnome-terminal the U1 notification applet never starts moving.

The files "sometimes" go away when I go home, sorry that this is anecdotal, but I've yet to narrow down the sequence since this happens over the course of an entire workday and evening, and I think that they only go away when U1 does the re-sync during system startup. So sometimes I reboot my laptop after giving a presentation, and when I get home the files are gone, and sometimes I work all day and when I get home the files are still there. Since they are in my way I tend to delete them as soon as I see them if U1 doesn't do it automatically.

Revision history for this message
Elliot Murphy (statik) said :
#3

Hi Ryan,

If you are still seeing this problem please do report a bug. Our test cases that detect file deletion via inotify are all passing, so I hope it's working ok for you.

Can you help with this problem?

Provide an answer of your own, or ask Ryan Maki for more information if necessary.

To post a message you must log in.