![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unix Arithmatic operation issue , datatype issue | thambi | Shell Programming and Scripting | 23 | 02-19-2008 03:19 AM |
| Built in ram limit for 64 bit | kermit | Linux | 2 | 05-18-2007 12:42 PM |
| tar 2GB limit | SLKRR | Filesystems, Disks and Memory | 9 | 12-04-2006 11:19 AM |
| Limit logins to 1 | pheusion | AIX | 0 | 08-11-2006 08:23 AM |
| Limit command | macdonto | UNIX for Dummies Questions & Answers | 1 | 10-21-2002 12:58 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
| Forum Sponsor | ||
|
|
|
||||
|
This sounds like what you want.. at least the question is the same. The answer, however, I did not test, so basically I'm just throwing a suggestion out there..
http://www.landfield.com/wu-ftpd/mai.../Oct/0013.html Quote:
Last edited by oombera; 01-22-2004 at 08:19 AM. |
|
||||
|
Quote:
but what is put master.c is it just upload that single file or does it upload all the files listed in master.c ? to me it looks like it just uploads the single file. Quote:
Is there not a way to pipe the output of directory listing to a file and then in turn pipe that to the ftp program so that it will go file by file instead of having to the mput e* or e01* in my script. Thanks for the help guys. |
|
|||
|
do a search for "Arguments too long" on this site.
It was explaned why this happens. its a limitation on the way the mput gets a list of its arguments. the quick fix is to tar up all the files then just send the tar file to your windows machine. OR cut your process up to putting 1024 files at a time. The below code is untested but it should work. Code:
#!/usr/bin/perl -w
use strict;
use Net::FTP;
my ($host, $user, $pass, $localfs, $remotefs)=( 'your_host', 'ur_username', 'ur_passwd', 'dir_holding_files' 'dir_2_upload_files);
chdir("$localfs") or die "can not change directory /homes($!)";;
my @ftp_files=glob("*");
$ftp = Net::FTP->new("$host", Debug => 0 ) or warn "Cannot connect to $host: $@";
$ftp->login("$user","$pass") or warn "Cannot login ", $ftp->message;
$ftp->binary();
$ftp->cwd("$remotefs");
for (@ftp_files) { $ftp->put("$_") };
$ftp->quit;
Last edited by Optimus_P; 01-22-2004 at 09:42 AM. |
|
||||
|
Well. it's a slow day. So
Code:
#! /usr/bin/ksh
stty -echo
print -n Enter Password-
read PASS
print
stty echo
exec 4>&1
HOST=xxx.yyy.com
USER=name
DESTDIR=junk
SOURCEDIR=~/tmp
cd $SOURCEDIR
ftp -nv >&4 2>&4 |&
print -p open $HOST
print -p user $USER $PASS
print -p cd $DESTDIR
ls | while read filename ; do
[[ -f $filename ]] && print -p put $filename
done
print -p close
print -p bye
wait
exit 0
|
||||
| Google The UNIX and Linux Forums |