Installation1. Download the lastest version from the download page
2. Uncompress the archive by using
tar -zxvf ecp-x.y.z.tar.gzWhere x.y.z is the version number
3. Enter the ecp directory that was created.
4. Compile and install ecp using make
If you dont have permission to install it in /usr/local you can copy the binary manually.
cp ecp ~/binThis will copy the ecp program to 'bin' in your home directory
Getting helpTo get the usage for ecp, run:
ecp --helpThis will also give a basic description for each option
Basic copyingIn its most basic invocation, ecp works similarly to the traditional cp command.
ecp foo /tmp/barWill copy the file foo in the current directory to /tmp and call the resulting file bar.
The exception to this is when /tmp/bar is a directory. In this case, the file 'foo' will be copied as /tmp/bar/foo
You can copy multiple files at once, as long as the destination is a directory.
ecp foo bar /tmpWill copy the files foo and bar in the current directory to /tmp
You can use globbing to specify multiple files more easily.
ecp /tmp/e* ./Will copy all the files in /tmp that begin with the letter e to the current directory.
If you want to copy a directory and all its contents, you must use the recursive option.
ecp -R /var/www /var/new_wwwor
ecp --recursive /var/www /var/new_wwwWill copy the directory /var/www and all its contents to /var/new_www
However, if /var/new_www exists and is a directory, all the items in /var/www will be copied to /var/new_www/www
Now, if you want to see a total progress for the copy operation - and you will, its very cool - you can use the total option.
ecp -R -t /var/www /var/new_wwwor
ecp --recursive --total /var/www /var/new_wwwWill display a progress meter for all the transfers, givingg you an indication of how far along in the transfer you are.
If you want to use ecp as if it was mv (such as to rename a file, or save you deleting the original later) you can use the kill option.
ecp -k foo /tmp/baror
ecp --kill foo /tmp/barThis will copy foo to /tmp/bar and remove the file foo. It is the same as
mv foo /tmp/barThis can be used along with ecp's other options and features.
Remote copyingecp can be used to copy files to and from ftp servers easily. The format of the command is almost identical to the basic copying functions, but incorporates some extra features. The basic idea is to replace some (or all) of the sources or destination with a file in the format
ftp://user:firstname.lastname@example.org/dir/fileNote, that if you do not need a username or password, 'user:pass@' can be omitted
So, to get a file archive.tar.gz in the directory 'downloads' on the server foo.org you would:
ecp ftp://foo.org/downloads/archive.tar.gz /tmpEasy as pi. This downloads it to /tmp on your computer. However, you can do this:
ecp ftp://foo.org/downloads/archive.tar.gzAnd it downloads it to your current directory, saving you 2 keystrokes.
This also works in reverse:
ecp /tmp/foo ftp://foo.org/uploadsWill put the file /tmp/foo unto the ftp site
If the remote server is running the ftp service on an unusual port, you can use the port option.
ecp --port 100 ftp://foo.org/download/archive.tar.gzThis will connect to port 100 on the remote machine to get the file.
Again, this works in reverse.
Finally, if your connection was interrupted while you were downloading a file, use the resume option.
ecp --resume ftp://foo.org/download/archive.tar.gzIf the server supports it, you will be able to continue downloading from when the connection was interrupted.