So lets call the perl script that does all the ftp stuff, ftp.pl
In the ftp.pl , the script allows 1 argument, that is the site that is needing to be transfered to/from.
Code:
hostfile="hosts.txt"
for host in `cat $hostfile`; do
perl ftp.pl $host &
done
That is assuming that you have all of the hosts inside of a file called hosts.txt (that way you can just add append additional hosts to the bottom). Easy as pie. If you want, you can use rsync, scp, rcp..whatever in linux.
I receive files by FTP in an input directory. Every 10 seconds a process checks if some new file has arrived to the input directory and then the process moves them to another directory to be read by a second process.
The problem is that there is no way to know if the download has finished... (11 Replies)
FROM WINDOWS , WHILE GETTING DATA FROM HP-UNIX SERVER USING FTP, I AM ABLE TO GET DATA ONLY LESS THAN 4GB FILE, PLZ HELP ME HOW TO GET MORE MORE THAN 4GB FILE. (4 Replies)
Hello,
I am trying to download several files from a remote FTP server using Net::FTP from within a perl script. The files download alright, except they appear to be corrupted. I know this because once after downloading, I use bzcat to pipe the files to a split command, and bzcat complains saying... (3 Replies)
Hi All,
I am using ncftpput in one of my c-shell script to upload files to a remote location. The source files keep coming continuosly and to upload each file ncftpput opens a new connection everytime. It means ncftp uploads the file1 than file2 than file3 .... There is gap 20-25 secs between... (10 Replies)
I am begginer to perl scripting, i like to learn all the functionality of the perl scrpting , Could you please help me on this :confused::confused: (2 Replies)
I m interested in making multiple websites, all with the same basic functionality but will have different designs or templates. is there a way they can all run off the same basic underlying code, but use different templates. what is the best method of doing this. (1 Reply)
Hi,
I have a problem while ftp'ing zip files one after the other from linux source directory to a ftp host machine. here is the shell script:
#!/bin/ksh
dir=data/dir1/dir2 # this dir is linux source directory where zip files located.
rmtdir='/home/'
echo $dir
for i in /$dir/*; do
if ;... (7 Replies)
Need assistance
I have a script which i can download the files from ftp server using perl . But i want to download multiple files at a time
#!/usr/bin/perl -w
use Net::FTP;
$ftp = Net::FTP->new("ftp.ncdc.noaa.gov");
$ftp->login('username', 'password');
$ftp->cwd("<dir>");... (9 Replies)
Hi All,
Please help.
I have requirement to read the file / folder based on the latest date and download the file and folder.
There will be files and folders in the location like
20140630-144422
20140630-144422.csv
20140707-182653
20140707-182653.csv
20140710-183153... (7 Replies)
Discussion started by: Praveen Pandit
7 Replies
LEARN ABOUT DEBIAN
gfrep
GFREP(1)GFREP(1)NAME
gfrep - replicate Gfarm files
SYNOPSIS
gfrep [ -mnqvx ] [ -S source-domainname ] [ -D destination-domainname ] [ -h source-hostfile ] [ -H destination-hostfile ] [ -N num-of-
replicas ] [ -j num-of-threads ] path ...
DESCRIPTION
gfrep creates specified number of replicas of Gfarm files specified by the path to specified set of destination hosts. When set of source
hosts are specified, only files stored on the set of source hosts are replicated. A set of hosts can be specified by a domain name and/or
a host file. When both a domain name and a host file are specified, a set of hosts is determined by both conditions.
If the path parameter is a directory, files under the directory will be copied recursively.
OPTIONS -S source-domainname
Specifies the domain name of source filesystem nodes from which replicas will be copied.
-D destination-domainname
Specifies the domain name of destination filesystem nodes to which replicas will be copied.
If neither this nor the -H option is specified, replicas may be copied to any available host.
-h source-hostfile
Specifies a file which describes hostnames of source filesystem nodes from which the replica will be made. The source-hostfile con-
sists of a filesystem node name on each line.
if ``-'' is specified, standard input is used to read the host list.
-H destination-hostfile
Specifies a file which describes hostnames of destination filesystem nodes on which the replica will be made. The destination-host-
file consists of a filesystem node name on each line.
if ``-'' is specified, standard input is used to read the host list.
-N num-of-replicas
Specifies the required number of file replicas, counting already existing ones. If there are a sufficient number of replicas in the
destination hosts, neither any copying nor any removal will be done.
If this option is not specified, -N 1 is assumed.
-j num-of-threads
Specifies the number of threads to create file replicas simultaneously. This option is only available when compiled by an OpenMP C
compiler. By default, it will be the smallest among the number of total files, the number of source hosts, and the number of desti-
nation hosts.
-m Lets gfrep command do a migrate/move, instead of doing replication.
-x Removes file replicas when a set of destination nodes has more file replicas than specified.
-n Displays files to be replicated, but does nothing.
-q Suppresses non-error messages.
-v Displays verbose output.
-? Displays a list of command options.
BUGS
A source host is not always selected within a set of source hosts.
Gfarm 09 November 2009 GFREP(1)