How could I make the a file on two computers the exact same?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
How could I make the a file on two computers the exact same?
I have two computers, both of which I use for development, so I want to have the source code files the same on both. They both run Ubuntu 11.10, and both have the source in the same directories (/home/ben/Programs/C/Crimson), and are both on the same network. Currently, I email the files, or use Bluetooth, however both of these are rather slow at sending them, and I would not know which is the most recent. Is there a program which can be put on both, and get the files (If they are newer, so if computer2 has it updated at 10:00PM, and computer 1 at 9:00PM, it would copy the computer2 one onto computer1, could you tell me? If not, how could I make the file be the same? I have tried Ubuntu One, and products like it, but these seem rather slow at uploading (I have a 40KB/s connection uploading, and 300KB/s downloading, but both computers have 802.11n, which should be much faster, as the folder is 2MB, the uploading would take about 51 seconds to upload and then about 6 to download, a total of 57 seconds, where as using the 802.11n network, it would be done in (If n only reaches about 100MB/s) 0.02 seconds, which is much faster), so I would prefer a application which works on my network.
Oh, by the way, the slow web speeds are because of the service provider. The internal network is Wireless N.
You could use rsync, but if you are developing you should maybe use source control? Svn or git. You could also use nfs from one of the servers and mount it on hybrid other one
You could use rsync, but if you are developing you should maybe use source control? Svn or git. You could also use nfs from one of the servers and mount it on hybrid other one
Thanks for the tips, I will look into them later. By the second one, couldn't I also set them up as FTP servers, and FTP from one to the other to put the new stuff on, and have it set to the directory? How would this be done?
why make it so difficult way?
Just share folder from other computer using nfs and then mount it to other. Then you have files in one location only.
This of course means that you must have sharing computer running all time. If you don't want that, then buy a cheap network disk where you store files.
Good idea is also backup your files using rsync and cron job regularly, even if you use files from two computers. Then you can easily go back if something happens.
If you want to use "cloud", you can setup dropbox folder to both computers. Then dropbox keeps files updated in both automatically. It just copies changed files over network, so I think it fast in your case.
why make it so difficult way?
Just share folder from other computer using nfs and then mount it to other. Then you have files in one location only.
This of course means that you must have sharing computer running all time. If you don't want that, then buy a cheap network disk where you store files.
Good idea is also backup your files using rsync and cron job regularly, even if you use files from two computers. Then you can easily go back if something happens.
If you want to use "cloud", you can setup dropbox folder to both computers. Then dropbox keeps files updated in both automatically. It just copies changed files over network, so I think it fast in your case.
If I use nfs with this tutorial, would the files stay in /home/user with the NFS? If it was turned off would they stay? Would it just be that one PC is connecting to the other's directory?
It works kind of like a 2-way rsync, and lets you choose which direction to propagate if the same file has been updated differently on both ends. You can even tell it to call an external program like diff in order to merge files if you want.
If I use nfs with this tutorial, would the files stay in /home/user with the NFS? If it was turned off would they stay? Would it just be that one PC is connecting to the other's directory?
Files will stay, nfs just shares directories to other users.
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900
Rep:
DropBox is one option. Dropbox syncs automatically, as long as you have an internet connection, so the most recent version is always the one that is available.
It works kind of like a 2-way rsync, and lets you choose which direction to propagate if the same file has been updated differently on both ends. You can even tell it to call an external program like diff in order to merge files if you want.
Perfect. Thanks!
Quote:
Originally Posted by k3lt01
DropBox is one option. Dropbox syncs automatically, as long as you have an internet connection, so the most recent version is always the one that is available.
As I said in the first post, I have tried things like DropBox and Ubuntu One and found them too slow.
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900
Rep:
Quote:
Originally Posted by ThatPerson
As I said in the first post, I have tried things like DropBox and Ubuntu One and found them too slow.
Are you sure there may not be another issue then? I would be checking your connection then because I have no such problem with DropBox and I have some pretty big files in my DB folder. I have heard UbuntuOne can be slow but I have never used it so cannot comment.
Are you sure there may not be another issue then? I would be checking your connection then because I have no such problem with DropBox and I have some pretty big files in my DB folder. I have heard UbuntuOne can be slow but I have never used it so cannot comment.
Very slow web connection. About 200KB/s download, and 40KB/s upload. For a 1MB file, it takes quite a while. I am going to have a look into dropbox, just incase.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.