master-server/deps/curl/docs/cmdline-opts/create-dirs.md

27 lines
848 B
Markdown
Raw Normal View History

2024-05-15 15:20:32 -04:00
---
2023-12-11 20:30:44 -05:00
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: create-dirs
Help: Create necessary local directory hierarchy
Category: curl
Added: 7.10.3
Multi: boolean
2024-05-15 15:20:32 -04:00
See-also:
- ftp-create-dirs
- output-dir
Example:
- --create-dirs --output local/dir/file $URL
2023-12-11 20:30:44 -05:00
---
2024-05-15 15:20:32 -04:00
# `--create-dirs`
2023-12-11 20:30:44 -05:00
When used in conjunction with the --output option, curl creates the necessary
local directory hierarchy as needed. This option creates the directories
mentioned with the --output option combined with the path possibly set with
2024-05-15 15:20:32 -04:00
--output-dir. If the combined output filename uses no directory, or if the
2023-12-11 20:30:44 -05:00
directories it mentions already exist, no directories are created.
Created directories are made with mode 0750 on unix style file systems.
To create remote directories when using FTP or SFTP, try --ftp-create-dirs.