Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Quote:
Originally Posted by Gregg Bell
Hi 273. I'm just dabbling with them. If they were more important I'd really want to know what's happening with them but I don't even have to use them.
To be honest I'm intrigued myself now whether you are creating hard links or not. It's possible that Dropbox don't allow hard links to avoid recursion but it would be nice to know for sure. I have seen people mention that hard links don't synchronise unless a change is made to them (for example "touch linkname" because while the directory being pointed to shows a change the hard link does not unless the change was made in the hard link directory (difficult to explain, sorry).
Hard links don't allow for recursion - but symlinks do (symlinks are handled differently preventing system problems).
The problem is not knowing how dropbox actually works (it is a proprietary daemon - thus no source code).
If it is using inotify then it is POSSIBLE that hard links are not supported (adding a hard link to a directory within the dropbox tree). If the addition of a name via a hard link is not counted as a "file creation" dropbox may not see it.
Creating the file within the dropbox is recognized - so perhaps adding the hard link separately would be acceptable.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Quote:
Originally Posted by jpollard
Hard links don't allow for recursion - but symlinks do (symlinks are handled differently preventing system problems).
The problem is not knowing how dropbox actually works (it is a proprietary daemon - thus no source code).
If it is using inotify then it is POSSIBLE that hard links are not supported (adding a hard link to a directory within the dropbox tree). If the addition of a name via a hard link is not counted as a "file creation" dropbox may not see it.
Creating the file within the dropbox is recognized - so perhaps adding the hard link separately would be acceptable.
Thanks, that makes sense of the ideas I had about what could be happening -- sorry to be derailling the thread a little to talk technicalities.
To be honest I'm intrigued myself now whether you are creating hard links or not. It's possible that Dropbox don't allow hard links to avoid recursion but it would be nice to know for sure. I have seen people mention that hard links don't synchronise unless a change is made to them (for example "touch linkname" because while the directory being pointed to shows a change the hard link does not unless the change was made in the hard link directory (difficult to explain, sorry).
No, you did a pretty good job explaining! I put a symlink into Dropbox. I'll report back later if it syncs in the other computer.
Hard links don't allow for recursion - but symlinks do (symlinks are handled differently preventing system problems).
The problem is not knowing how dropbox actually works (it is a proprietary daemon - thus no source code).
If it is using inotify then it is POSSIBLE that hard links are not supported (adding a hard link to a directory within the dropbox tree). If the addition of a name via a hard link is not counted as a "file creation" dropbox may not see it.
Creating the file within the dropbox is recognized - so perhaps adding the hard link separately would be acceptable.
This is getting over my head but I did add a sym link to Dropbox (as well as another hard link for the heck of it) and will report back when I check the other computer.
So, one of the main differences between sym links and hard links is if I'm working on a file and I accidentally delete it, the sym link is gone too, whereas with a hard link the file is still in tact in the location I put it. Right? (I see hard links as a safeguard.)
So, one of the main differences between sym links and hard links is if I'm working on a file and I accidentally delete it, the sym link is gone too, whereas with a hard link the file is still in tact in the location I put it. Right? (I see hard links as a safeguard.)
The file representing the symlink is still there - that is a separate file and doesn't get deleted, but if you delete the file with data then it is gone - leaving only the symlink.
With the hard link the file data is still intact, but can only be accessed via the other pathname.
The file representing the symlink is still there - that is a separate file and doesn't get deleted, but if you delete the file with data then it is gone - leaving only the symlink.
With the hard link the file data is still intact, but can only be accessed via the other pathname.
Thanks jpollard. Not sure I entirely understand. I actually experimented. I had a file in my Documents folder and I put a sym link of that file in my Dropbox folder. Then I was working on the file in my Documents folder and deleted it. When I went to my Dropbox folder the file (the sym link) was still there, however it had a little "X" in it and there was no data.
So really what I was saying is the case, then? Delete the source file and if you only have a sym link you're out of luck, right? Yes, the sym link still exists but it contain no data, right?
Thanks jpollard. Not sure I entirely understand. I actually experimented. I had a file in my Documents folder and I put a sym link of that file in my Dropbox folder. Then I was working on the file in my Documents folder and deleted it. When I went to my Dropbox folder the file (the sym link) was still there, however it had a little "X" in it and there was no data.
So really what I was saying is the case, then? Delete the source file and if you only have a sym link you're out of luck, right? Yes, the sym link still exists but it contain no data, right?
Thanks
Correct that the original data is gone - The symlink itself still exists and can be used to identify WHERE the file USED to be.
Okay. I just tested the softlink and the hardlink files in Dropbox on my home computer and they both synced. I don't know why the hardlink didn't sync before.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.