One line command to check file in ftp site is exist or not or filesize.
C:\curl>curl ftp://ftpserver/path/manual.txt -u alan:pass --list-only --head
Last-Modified: Thu, 11 Dec 2008 15:57:58 GMT
Content-Length: 111054
Accept-ranges: bytes
C:\curl>curl ftp://ftpserver/path/manual_1.txt -u alan:pass --list-only --head
curl: (19) Given file does not exist
Remember , If you want to output the screen into a file for other reading check purpose by other application .
please alway reference
output.log 2>&1
C:\curl>curl ftp://ftpserver/path/manual_1.txt -u alan:pass --list-only --head > output.log 2>&1
C:\curl>curl ftp://ftpserver/path/manual.txt -u alan:pass --list-only --head > output.log 2>&1
Last-Modified: Thu, 11 Dec 2008 15:57:58 GMT
Content-Length: 111054
Accept-ranges: bytes
C:\curl>curl ftp://ftpserver/path/manual_1.txt -u alan:pass --list-only --head
curl: (19) Given file does not exist
Remember , If you want to output the screen into a file for other reading check purpose by other application .
please alway reference
output.log 2>&1
C:\curl>curl ftp://ftpserver/path/manual_1.txt -u alan:pass --list-only --head > output.log 2>&1
C:\curl>curl ftp://ftpserver/path/manual.txt -u alan:pass --list-only --head > output.log 2>&1
留言
張貼留言