Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use a PHP IDE that has no built-in ability to upload a project to a site.

So, I'm looking for common easy to use tool for Linux that would able to upload modified documents to the server instead of uploading of the whole site.

I also accept shell scripts that would be able to do this.

share|improve this question
up vote 3 down vote accepted

Install lftp if you don't have it yet. Then create a bash script containing the following:

lftp -f "
open <hostname>
user <username> <password>
mirror --reverse --delete --verbose $SOURCE $TARGET

Replace <hostname>, <username> and <password> with your actual data.

This will effectively sync your local files to the remote folder, deleting everything that doesn't exist locally anymore (this is the delete option). --reverse specifies that you want to actually update your remote folder instead of your local one.

Have a look at lftp's man page for more details. And always have a backup ready so you don't delete anything in case a command goes wrong.

This is adapted from this script here.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.