| Author |
How to ftp (upload) a whole directory by script automatically?
|
|
| wavelet.liu@gmail.com 2006-08-02, 1:23 am |
| I want to schedule one cron job to do it in unix to upload one
directory
to remote server. I know some basic script to transfer one file is
like:
ftp -n <<EOF
open host
user username password
cd somewhere
(...)
get file
put file
(...)
quit
EOF
How about the whole direcory?
--Wavelet
| |
| Bill Marcum 2006-08-02, 1:23 am |
| On 1 Aug 2006 19:01:03 -0700, wavelet.liu@gmail.com
<wavelet.liu@gmail.com> wrote:
> I want to schedule one cron job to do it in unix to upload one
> directory
> to remote server. I know some basic script to transfer one file is
> like:
>
> ftp -n <<EOF
> open host
> user username password
> cd somewhere
> (...)
> get file
> put file
> (...)
> quit
> EOF
>
> How about the whole direcory?
>
The simplest way is to tar the directory and put it as one file, or you
can use rsync if it is installed on both machines.
--
Talking much about oneself can also be a means to conceal oneself.
-- Friedrich Nietzsche
| |
| Chuck Dillon 2006-08-02, 1:28 pm |
| wavelet.liu@gmail.com wrote:
> I want to schedule one cron job to do it in unix to upload one
> directory
> to remote server. I know some basic script to transfer one file is
> like:
Look at the ftp command mget.
-- ced
>
> ftp -n <<EOF
> open host
> user username password
> cd somewhere
> (...)
> get file
> put file
> (...)
> quit
> EOF
>
> How about the whole direcory?
>
> --Wavelet
>
--
Chuck Dillon
Manager of Software Development, Bioinformatics
NimbleGen Systems Inc.
|
|
|
|