I have a report which I am writing as a .tex file, and I am editing from two computers (office and home laptop). I use rsync over ssh connection to synchronise between them and all the rssync commands are written in a Shell script.
I run this code, in a shell script, after finishing some part of the work at either machine.
Now, it turns out that I have edited some portion in my laptop yesterday night, and forgotten to do this synchronisation. and came to work today, and edited the same tex file. I realised the mistake , when the generated pdf showed some old content.
Now , I am stuck. If I go home and run this synchronising commnd, it will overwrite the changes I made in my laptop . Basically I have two versions of the same file.
Is there any way, automatically you can use some shell scripting to see which portions were modified in the laptop, and merge the two versions together,. I know that diff command works to find the difference between two files, but is there some better way to do it, I dont understand very clearly the output of diff, but can rsync help in this ?
I should have used some DropBox which automatically syncs, but anyways, how do I solve this ?
This is a little messier than you might hope. You can created what is called an ed script using diff, then run ed against the script. This is usually called merging files.
The reason I suggest this approach is that latex is more like a PDL than text
Thanks all for your suggestions. I ran diff command and found with the output, which lines differ. Then I manually copy pasted the changes from one file to the other, and ran diff again .
Maybe there was a simpler solution , but this is what I found most useful.
Hi
I have a requirement to rsync from remote to local machine via ssh and sync files that are changed in last n hours.
pgrep to check if no other sync is running
pgrep -f rsync.*/opt > /dev/null || rsync --bwlimit=10000 -avz --delete root@X.X.X.X:/var/source/ /opt/dest/ >> /home/log 2>&1... (0 Replies)
I have a VirtualBox w2008r2 Domain Controller running on a Solaris 10 server. I have the time on the Virtual machine set to Default time sync (bios clock) and the Solaris server set to sync to
0 8,20 * * * /usr/sbin/ntpdate tick.usno.navy.mil tock.usno.navy.mil >> /tmp/ntp.log
My problem is... (2 Replies)
rsync for solaris seems to be a spotty beast. It's not installed by default. I facing a problem where I didn't have root access to be able install rsync. I did have ssh access and was able to configure the authorized keys so that no password was required to connect from one server to another. ... (1 Reply)
Hi Everyone,
We have a requirement to sync files with multiple nodes. We need to run the rsync sequentially on each node, if one of the node fails we need to recover the files to previous state in all nodes. I know that we have backup option in rsync which takes the backup of files before... (0 Replies)
Hi,
I have 4 machines and all are NTP configured with same ntp.conf file. But 3 machines are in sync with Time server and 4th machine is not contacting & sync with the NTP server. Please see the below details.
# service ntpd stop
Stopping ntpd: ... (0 Replies)
Hi,
I am copying files from one server to the other by rsync utilty.
I am giving a list file to the rsync and i am writing it to the log also.
The problem is that,rsync is not copying the order in which i have given files and links to the list. I can see it, through the log file.
I am giving... (7 Replies)
Hi,
I am using Tk module in perl 5.6 and it is working fine. Now when i installed the newer version 5.10.0 then getting error that Tk module not found. But i will have to work on this newer verison only to use some other modules of perl.
I want to know why Tk module is not working in newer... (6 Replies)
Hi all....I have a Sun Ultra2 that I want to use with my PC monitor. I have purchased an adapter that does not work and I was told I need to change my video card setting (if I can) to Separate Sync.....my Monitor product number ends in 1343......I am running SunOS 5.7 ......anyone have any ideas?
... (0 Replies)
hi guys,
i am new to this DNS business and i'm having a problem.
the setup is bind 9.2.3 is installed on a sun solaris 8 server and is the primary DNS. men and mice suite is installed on another sun solaris 8 and that is our secondary DNS server.
problem is recently the secondary DNS stopped... (0 Replies)
Hi,
I wanna synchronize all the /etc settings from my previous server to new one. (Both of them are Debian Etch 4.0) I used this command:
rsync -r -vz -e ssh someuser@myOldServer:/etc /etc
&
rsync -avz -e ssh someuser@myOldServer:/etc /etc
These commands told me that everything occur perfectly... (6 Replies)