I am using curl command to interact with the FTP server. I have gathered some information around downloading / uploading of files using curl command.
However, I couldn't find any information around
1) Listing all the files on FTP server in any given folder having a specific extn.
( ls *.config )
2) Moving files across different folders on FTP server
In short, I am looking out for information which details about using FTP commands on FTP server using curl command.
Aren't there any way to download files as below?
For example, I want to download all .html files under the root directory of unix.com/
curl -O https://www.unix.com/*.html
This won't work, but please tell me the way to do this.
Well, the best way is to get the file list of the directory, but i... (6 Replies)
I have to transfer a file from my aix box to another server using ftps protocol, how can i achieve this using curl preferably or any other utility.
Regards
Sandeep (0 Replies)
Currently I am trying to download a file from a secure site that I do not control. I need to use a pem cert to get past their firewall. Currently I am trying to use curl to get the file and return it using the following information pemcert.txt containing the cert, username, password, domain,... (0 Replies)
Hi
I am trying to fetch a file from a remote location and download it into a local directory ...i was previously doing it quite simply using ftp but now i need to do the same using the cURL tool ...Here i am not getting an option to specify a directory name i am trying the following but... (0 Replies)
Hello - I'm a novice, so apologies if this is a stupid/answered question.
I'm operating on a mac, and I'm using ftp to transfer files to my computer. The files have atypical names, although I have a list of them, addresses included. Is there a way to automate this using curl?
That is to... (3 Replies)
Hi all;
first of all i need to clarify that i am new to apache2 server configuration and for some needs i want to transfer some files using curl to web directory,so please bear with me:
following is the command i m running to transfer file to my web directory:
curl -T "q"... (4 Replies)
hello,
I'm trying to upload a file to this ftp server and others ftp://ftp.byethost12.com as you can see in the output of CURL using the -v option
curl reports that the upload succeeded but when i connected to the server with file-zilla there is no file uploaded the same command
upload files... (5 Replies)
Hello all,
I have been struggling with this issue on and off for a couple of weeks now and I just got it all working, so I wanted to share my findings in case some other poor soul needs to know how. First some background on what I'm doing. I am uploading files to different directories based on... (0 Replies)
Hi,
For an order I requested, the provider has uploaded a tar file in public FTP site which internally has tons of files (compressed) and I need to download files that follows particular pattern which would be few hundreds.
Note: The order can't be requested for files that follows the... (7 Replies)
Discussion started by: Amalan
7 Replies
LEARN ABOUT MOJAVE
curlinfo_filetime
CURLINFO_FILETIME(3) curl_easy_getinfo options CURLINFO_FILETIME(3)NAME
CURLINFO_FILETIME - get the remote time of the retrieved document
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_FILETIME, long *timep);
DESCRIPTION
Pass a pointer to a long to receive the remote time of the retrieved document (in number of seconds since 1 jan 1970 in the GMT/UTC time
zone). If you get -1, it can be because of many reasons (it might be unknown, the server might hide it or the server doesn't support the
command that tells document time etc) and the time of the document is unknown.
Note that you must tell the server to collect this information before the transfer is made, by using the CURLOPT_FILETIME(3) option to
curl_easy_setopt(3) or you will unconditionally get a -1 back.
PROTOCOLS
HTTP(S), FTP(S), SFTP
EXAMPLE
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, url);
/* Ask for filetime */
curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
res = curl_easy_perform(curl);
if(CURLE_OK == res) {
res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
if((CURLE_OK == res) && (filetime >= 0)) {
time_t file_time = (time_t)filetime;
printf("filetime %s: %s", filename, ctime(&file_time));
}
}
/* always cleanup */
curl_easy_cleanup(curl);
}
AVAILABILITY
Added in 7.5
RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
SEE ALSO curl_easy_getinfo(3), curl_easy_setopt(3),
libcurl 7.54.0 April 03, 2017 CURLINFO_FILETIME(3)