Skip to content

Commit

Permalink
usingcurl/uploads.md: mention globbing
Browse files Browse the repository at this point in the history
Add the -T globbing explanation to the generic upload section as well,
instead of only having it in the FTP upload section.
  • Loading branch information
bagder committed Jun 20, 2024
1 parent 90c60d0 commit bc70987
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions usingcurl/uploads.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ that becomes the filename used when stored remotely:

curl -T uploadthis ftp://example.com/this/directory/

So if you prefer to select a different filename on the remote side than what
you have used locally, you specify it in the URL:

curl -T uploadthis ftp://example.com/this/directory/remotename

FTP and SFTP also support *appending* to the target file when uploading
instead of overwriting, with the `--append` option:

Expand Down Expand Up @@ -101,3 +96,18 @@ support can output something even for an upload.
Therefore, you may need to explicitly redirect the downloaded data to a file
(using shell redirect '>', `-o` or similar) to get the progress meter
displayed for upload.

## Globbing

curl also supports [globbing](../cmdline/urls/globbing.md) in the `-T`
argument so you can opt to easily upload a range of files:

curl -T 'image[1-99].jpg' ftp://ftp.example.com/upload/

or a series of files:

curl -T '{file1,file2}' https://example.com/upload/

or

curl -T '{Huey,Dewey,Louie}.jpg' ftp://ftp.example.com/nephews/

0 comments on commit bc70987

Please sign in to comment.