You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -265,6 +265,21 @@ $ dbxcli get /remote/file.txt ./local-file.txt # download a single file
265
265
$ dbxcli get -r /remote/folder ./local-folder # recursively download a folder
266
266
```
267
267
268
+
### Piping with stdin/stdout
269
+
270
+
Use `-` as the local operand to stream through pipes:
271
+
272
+
```sh
273
+
$ printf'hello'| dbxcli put - /hello.txt # upload from stdin
274
+
$ tar cz ./src | dbxcli put - /backups/src.tgz # pipe archive to Dropbox
275
+
$ dbxcli get /backups/src.tgz - | tar tz # download to stdout and list
276
+
$ dbxcli get /file.txt - > local-copy.txt # download to stdout, redirect to file
277
+
```
278
+
279
+
Stdin uploads are spooled to a temp file before uploading, so disk space up to the full input size is required. Stdout downloads are byte-clean: all progress and diagnostic output goes to stderr.
280
+
281
+
A bare `-` means stream only when it is the local operand. Dropbox paths named `-` are valid, for example `dbxcli put - /-` and `dbxcli get /- -`. To upload a local file literally named `-`, use `./-`.
0 commit comments