#] #] ********************* #] "$d_SysMaint"'internet & wifi/curl - [up, down]load files notes.txt' www.BillHowell.ca 02Oct2020 initial based on forgotten scripts somewhere #48************************************************48 #24************************24 # Table of Contents, generate with : # $ grep "^#]" "$d_SysMaint"'internet & wifi/curl - [up, down]load files notes.txt' | sed "s/^#\]/ /" # ********************* #24************************24 08******08 #] ??Feb2024 08******08 #] ??Feb2024 08******08 #] ??Feb2024 08******08 #] ??Feb2024 08******08 #] ??Feb2024 08******08 #] ??Feb2024 08******08 #] ??Feb2024 08******08 #] ??Feb2024 08******08 #] 22Feb2024 download URL directory listing : $ curl --list-only 10:41$ curl --list-only 'http://www.BillHowell.ca/Bill Howells videos/' 400 Bad Request

Bad Request

Your browser sent a request that this server could not understand.

>> doesn't work 08******08 #] ddmMMM2021 download IJCNN2021 videos : $ curl -o '/media/bill/VIDEOS/Neural Net videos/2021 IJCNN Shenzen, China online/262.mp4' 'https://confcats-event-sessions.s3.amazonaws.com/ijcnn21/videos/262.mp4' >> NYET! use wget https://www.howtogeek.com/447033/how-to-use-curl-to-download-files-from-the-linux-command-line/ 08******08 #] ?date? curl -> you must be connected to the internet!!! https://www.shellhacks.com/check-website-availability-linux-command-line/ Check a Website Availability from the Linux Command Line Posted on Tuesday December 27th, 2016 by admin Check a website availability with CURL Execute the following command to check whether a web site is up, and what status message the web server is showing: $ curl -Is http://www.shellhacks.com | head -1 HTTP/1.1 200 OK Status code ‘200 OK’ means that the request has succeeded and a website is reachable. Here is an another example that shows you how curl displays different status codes. $ curl -Is http://shellhacks.com | head -n 1 HTTP/1.1 301 Moved Permanently 08********08 #] 02Oct2020 curl -Is : fetch headers only of a specified file (file information - see below) $ find "/media/bill/PROJECTS/Qnial/MY_NDFS/" -maxdepth 1 -type f -name "*.ndf" | tr \\n \\0 | xargs -0 -IFILE grep --with-filename --line-number "curl" "FILE" /media/bill/PROJECTS/Qnial/MY_NDFS/file_ops.ndf:480: host link 'curl --output "' pname '" "' URLname '" ' ; $ find "/media/bill/PROJECTS/bin/" -maxdepth 1 -type f -name "*.sh" | tr \\n \\0 | xargs -0 -IFILE grep --with-filename --line-number "curl" "FILE" /media/bill/PROJECTS/bin/cloud work file.sh:26:curl "$url$fname" -o "$d_cloud$fname" /media/bill/PROJECTS/bin/cloud work file.sh:40:curl -T "$d_cloud$fname" "$url$fname" $ curl -Is "http://www.BillHowell.ca/index.html" HTTP/1.1 200 OK Date: Fri, 02 Oct 2020 18:03:28 GMT Server: Apache Last-Modified: Tue, 22 Sep 2020 23:30:33 GMT ETag: "2198-5afef5a79a1bb" Accept-Ranges: bytes Content-Length: 8600 Vary: Accept-Encoding,User-Agent Content-Type: text/html; charset=utf-8 $ curl -Is "http://www.BillHowell.ca/index.html" | head -1 HTTP/1.1 200 OK QNial : qnial> host_result 'curl -Is "http://www.BillHowell.ca/index.html" | head -1' +---------------+ |HTTP/1.1 200 OK| +---------------+ 08********08 #] man curl -I, --head (HTTP FTP FILE) Fetch the headers only! HTTP-servers feature the command HEAD which this uses to get nothing but the header of a document. When used on an FTP or FILE file, curl displays the file size and last modification time only. -s, --silent Silent or quiet mode. Don't show progress meter or error messages. Makes Curl mute. It will still output the data you ask for, potentially even to the terminal/stdout unless you redirect it. -l, --list-only (FTP POP3) (FTP) When listing an FTP directory, this switch forces a name-only view. This is espe‐ cially useful if the user wants to machine-parse the contents of an FTP directory since the normal directory view doesn't use a standard look or format. When used like this, the option causes a NLST command to be sent to the server instead of LIST. Note: Some FTP servers list only files in their response to NLST; they do not include sub-directories and symbolic links. (POP3) When retrieving a specific email from POP3, this switch forces a LIST command to be performed instead of RETR. This is particularly useful if the user wants to see if a specific message id exists on the server and what size it is. Note: When combined with -X, --request, this option can be used to send an UIDL command instead, so the user may use the email's unique identifier rather than it's message id to make the request. Added in 4.0. # enddoc