Using perl 5.8.0, Linux 2.4.20-30.9, RedHat 9.0.
We have many .cgi's that allow privileged users to upload files to the server through a web browser. We've had these .cgi's for years and have never had any problems with them. Recently the files being uploaded are sometimes being given 600... (16 Replies)
I know this must be really easy, but i can't get it to work
I've got a perl script, with a file.
I want to print an empty line, and the following doesn't seem to work:
print nameoffile "\n"
thanks for your help!! (3 Replies)
Hi,
May I know how to check for empty file in Perl.
Iam missing something, somewhere.
#!/usr/bin/perl
my $open_dir = '/path/';
my $file;
my $ma = "abc_.*.\.psv\$"
opendir(VAR, $open_dir) or die "Can't open $oepn_dir: $!\n";
while( defined ($file = readdir VAR) ) #read all... (1 Reply)
Hi All,
I am checking for a empty input file to do some further action , but I am getting exit status 0 in both the cases , for empty and non empty file both.
The value of $? is coming 0 in if part also and else part too.
#!/bin/ksh
if ]; then
echo "data"
# exit 0
echo "$?"
else... (4 Replies)
one of the business users is ftping files into unix box using user name ftp_user, where as i am using infa_user to login into same unix box. When i am trying to access those or copy over those files from upload directory it says permission denied.
Though i know the password of ftp_user to... (4 Replies)
Hi
I'm using this script to upload a file from local system to sftp server.
But in the log file i'm getting an error "Error during upload"
Can you please help me out ...
### CONFIGURATION
LOCAL_DIR=/abc/out
FILE_MASK="File*.txt"
LOG_DIR=/abc/error/File_`date "+%Y%m%d%H%M%S"`.LOG... (3 Replies)
I have ftp url, username and passwd.
My file is named app.log.
How do I upload this to my ftp server???
I read the manual but I didn't understand much...:cool: (4 Replies)
Thourgh Perl scripting, Is it possible to upload excel sheet to sharepoint portal ?
If the answer is YES.. Could you please share your thoughts and required CPAN modules or any examples to proceed further?
Regards,
Giridhar S
---------- Post updated at 04:26 AM ---------- Previous update... (0 Replies)
I have setup our SFTP server:
SFTP Setup:
/etc/ssh/sshd_config:
Subsystem sftp internal-sftp
Match Group sftpusers
PasswordAuthentication yes
ChrootDirectory /srv/sftponly
AllowTCPForwarding no
X11Forwarding no
ForceCommand internal-sftp
Adding the... (5 Replies)
Discussion started by: metallica1973
5 Replies
LEARN ABOUT MOJAVE
curlopt_infilesize
CURLOPT_INFILESIZE(3) curl_easy_setopt options CURLOPT_INFILESIZE(3)NAME
CURLOPT_INFILESIZE - set size of the input file to send off
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INFILESIZE, long filesize);
DESCRIPTION
When uploading a file to a remote site, filesize should be used to tell libcurl what the expected size of the input file is. This value
must be passed as a long. See also CURLOPT_INFILESIZE_LARGE(3) for sending files larger than 2GB.
For uploading using SCP, this option or CURLOPT_INFILESIZE_LARGE(3) is mandatory.
To unset this value again, set it to -1.
When sending emails using SMTP, this command can be used to specify the optional SIZE parameter for the MAIL FROM command.
This option does not limit how much data libcurl will actually send, as that is controlled entirely by what the read callback returns, but
telling one value and sending a different amount may lead to errors.
DEFAULT
Unset
PROTOCOLS
Many
EXAMPLE
CURL *curl = curl_easy_init();
if(curl) {
long uploadsize = FILE_SIZE;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/destination.tar.gz");
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(curl, CURLOPT_INFILESIZE, uploadsize);
curl_easy_perform(curl);
}
AVAILABILITY
SMTP support added in 7.23.0
RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
SEE ALSO CURLOPT_INFILESIZE_LARGE(3), CURLOPT_UPLOAD(3),
libcurl 7.54.0 February 03, 2016 CURLOPT_INFILESIZE(3)