PHP should be a lot to understand Linux, ask a question, local development, how to only the last day of modified files to sync to the server

Source: Internet
Author: User
Tags rsync
PHP should be a lot to understand Linux, ask a question, local development, how to only the last day of the modified files to sync to the server?
Because the previous time has done a synchronization, a lot of files, so it is impossible or the whole upload again, just want to copy the file modification times on the line, I hope to use the Linux shell programming to achieve, but not familiar with Shell programming, do not know there will be?

------Solution--------------------
It may be easier to implement with code management tools.
In local check in.
On the server update, update all the modified.

------Solution--------------------
discuss
It may be easier to implement with code management tools.
In local check in.
On the server update, update all the modified.


------Solution--------------------
discuss
No, don't want to use SVN, our local development is with SVN, but I don't want to publish the update in this way,
That's what it's about.
Using shell programming, use the Linux file Lookup command to find the files that are modified at a certain point in time, and then send them out to the remote server with commands such as CP or SCP.

------Solution--------------------
You checkout a little bit better. Toss...
------Solution--------------------
Rsync is also possible.
------Solution--------------------
Obviously, you're trying to implement an SVN yourself.
------Solution--------------------
Study Ah ....
------Solution--------------------
discuss
Just using rsync, found that two points insufficient:
1, I want to specify some of the subdirectories are out of sync, do not know whether it can be implemented?
2, add files, modify the file can be synchronized Yes, but how to delete a file, I want a file to be deleted locally, after the remote service after synchronization, the corresponding directory should also delete a file, do not know whether it can be implemented?

If we can solve these two problems, I can add points, thank you.

------Solution--------------------
Explore
There is a problem to be solved, that is, if it is to the remote server, so that the timing of the work, then the input password is a problem (in the case of SSH with the effect of the login), do not know how to solve? For example:

Rsync-vazu-p--delete--exclude=.svn/var/www/html/myweb root@192.168.1.2:/var/bak/

After execution, you need to enter the password of the remote machine, so how do you put it in a timed script?

------Solution--------------------
discuss
No, I'm telling you why I don't want to use SVN, the biggest problem is that after the update, every directory has. SVN this directory, I do not want to exist in remote working server such superfluous things, understand?


In addition, Rsync's removal synchronization problem has been solved

------Solution--------------------
discuss
Expect need to be installed separately? I don't have it in rhel5.4?

In addition, if you do not need to expect, the use of Linux internal Support command can be implemented to automatically enter the password? For example, use the pipeline command to transfer the password to rsync?

------Solution--------------------
Explore
Reference:
No, I'm telling you why I don't want to use SVN, the biggest problem is that after the update, every directory has. SVN this directory, I do not want to exist in remote working server such superfluous things, understand?


In addition, Rsync's removal synchronization problem has been solved



Up a bit, I wonder how this problem is solved?

------Solution--------------------
Perl code
#!/bin/bashexpect-c "spawn ssh 127.0.0.1; Expect password:; Send mima\n; Interact "
------solution--------------------
can be done with SVN. SVN can export files that have been modified between two versions. Then you copy the exported file to the line.
------Solution--------------------
Drill for Ngau Tau Kok??


have svn not to use shell?



---------------------------Use technology for advertising, thank you for supporting------------------------------------------------
Ventes Batteries PC Portable, alimentation pc Portable, batteries Camescope, Appareil numerique, des chargeurs
Rolex watches, Replica Watches, Replica Watch
r4ds Cartes, Cartes R4, R4 DSi, R4 SDHC pour Nintendo ds/ds, DSi
Baterias
R4Ds Cartes, Cartes R4, R4 DSi, R4 SDHC pour Nintendo ds/ds, DSi
r4ds Cartes, Cartes R4, R4 DSi, R4 SDHC pour Nintendo DS /DS, DSi
r4ds Cartes, Cartes R4, R4 DSi, R4 SDHC pour Nintendo ds/ds, DSi
r4ds Cartes, Cartes R4, R4 DSi, R4 SDHC Pour Nintendo ds/ds, Dsi
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.