I should know a lot about linux in php. I have a question: after local development, how can I synchronize only the files modified in the last day to the server?-php Tutorial

Source: Internet
Author: User
I should know a lot about linux in php. I have a question: after local development, how can I synchronize only the files modified in the last day to the server? Because synchronization has been performed at one time in the early stage and there are many files, it is impossible to upload the file as a whole. just copy the file at the time of modification, I hope to use shell programming in linux, but I am not familiar with shell programming. I don't know if it will happen here? ------ Solution ------------------ I should know a lot about linux when using code for php. ask a question: after local development, how can I synchronize only the files modified in the last day to the server?
Because synchronization has been performed at one time in the early stage and there are many files, it is impossible to upload the file as a whole. just copy the file at the time of modification, I hope to use shell programming in linux, but I am not familiar with shell programming. I don't know if it will happen here?

------ Solution --------------------
It may be easier to use code management tools.
Check in.
Update on the server.

------ Solution --------------------
Discussion
It may be easier to use code management tools.
Check in.
Update on the server.


------ Solution --------------------
Discussion
No, I don't want to use svn. We use svn for local development, but I don't want to release updates in this way,
This is what we want to do now.
Use shell programming, use the linux file search command to find the files modified after a certain time point, and then send these files to the remote server using commands such as cp or scp.

------ Solution --------------------
You just need to checkout it .. Tossing...
------ Solution --------------------
Rsync is also possible
------ Solution --------------------
Obviously, you want to implement svn by yourself.
------ Solution --------------------
Learning ....
------ Solution --------------------
Discussion
I just used rsync and found two shortcomings:
1. I want to specify that some of the subdirectories are not synchronized. I wonder if it can be implemented?
2. synchronization of new and modified files is correct. but how can I delete a file? if I want to delete a file locally, under the synchronized remote service, A file should also be deleted in the corresponding directory. I wonder if it can be implemented?

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

------ Solution --------------------
Discussion
There is another problem that needs to be solved. if it is to transfer data to a remote server for scheduled work, then entering the password becomes a problem (without ssh login with the same effect ), I don't know how to solve it? For example:

Rsync-vazu-p -- delete -- exclude =. svn/var/www/html/myweb [email protected]:/var/bak/

After execution, you need to enter the password of the remote machine. in this way, how can I use it in a scheduled script?

------ Solution --------------------
Discussion
No, I tell you why I don't want to use svn. The biggest problem is that after update, each directory has. svn Directory. I don't want to have this extra stuff in the remote work Server. do you understand?


In addition, the rsync deletion synchronization problem has been solved.

------ Solution --------------------
Discussion
Does secondary CT need to be installed independently? What I don't have in rhel5.4?

In addition, can I use the internal support commands of linux to automatically enter the password without using dig CT? For example, how can I transmit a password to rsync using pipeline commands?

------ Solution --------------------
Discussion
Reference:
No, I tell you why I don't want to use svn. The biggest problem is that after update, each directory has. svn Directory. I don't want to have this extra stuff in the remote work Server. do you understand?


In addition, the rsync deletion synchronization problem has been solved.



I don't know how to solve this problem?

------ Solution --------------------
Perl code
#! /Bin/bashexpect-c "spawn ssh 127.0.0.1; keep Ct password:; send mima \ n; interact"
------ Solution --------------------
You can use svn. Svn can export files modified between two versions. Then copy the exported file to the production environment.
------ Solution --------------------
Why ??


SHELL is not required for SVN?



------------------------- Use technology to change the advertisement. thank you for your support ------------------------------------------------
Ventes Batteries PC Portable, Alimentation PC Portable, Batteries cam.pdf, 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.