xref: /curl/docs/cmdline-opts/no-clobber.md (revision 2abfc759)
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Long: no-clobber
5Help: Do not overwrite files that already exist
6Category: output
7Added: 7.83.0
8Multi: boolean
9See-also:
10  - output
11  - remote-name
12Example:
13  - --no-clobber --output local/dir/file $URL
14---
15
16# `--no-clobber`
17
18When used in conjunction with the --output, --remote-header-name,
19--remote-name, or --remote-name-all options, curl avoids overwriting files
20that already exist. Instead, a dot and a number gets appended to the name of
21the file that would be created, up to filename.100 after which it does not
22create any file.
23
24Note that this is the negated option name documented. You can thus use
25--clobber to enforce the clobbering, even if --remote-header-name is
26specified.
27