Movatterモバイル変換


[0]ホーム

URL:


everything curl

    FTP type

    This is not a feature that is widely used.

    URLs that identify files on FTP servers have a special feature that allows youto also tell the client (curl in this case) which file type the resourceis. This is because FTP is a little special and can change mode for a transferand thus handle the file differently than if it would use another mode.

    You tell curl that the FTP resource is an ASCII type by appending;type=A tothe URL. Getting thefoo file from the root directory ofexample.com usingASCII could then be made with:

    curl "ftp://example.com/foo;type=A"

    curl defaults to binary transfers for FTP, but the URL format allows you tospecify the binary type withtype=I:

    curl "ftp://example.com/foo;type=I"

    Finally, you can tell curl that the identified resource is a directory if thetype you pass is D:

    curl "ftp://example.com/foo;type=D"

    …this can then work as an alternative format, instead of ending the pathwith a trailing slash as mentioned above.


    [8]ページ先頭

    ©2009-2025 Movatter.jp