Bug 802697
Summary: | mkdir -p ignores already created directory | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | cornel panceac <cpanceac> |
Component: | coreutils | Assignee: | Ondrej Vasik <ovasik> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 16 | CC: | kdudka, maxamillion, ovasik, pbrady, p, twaugh |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-03-13 10:23:28 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
cornel panceac
2012-03-13 10:02:15 UTC
That's expected behavior. Treat -p as "make sure it (and any parent) exists". It's akin to `touch file`. If you want to split the parents vs exists behavior you might want: mkdir -p $(dirname "$dir") mkdir "$dir" cheers. This great but, where is it documented? The man page states: -p, --parents no error if existing, make parent directories as needed I see, i thought it's no error if parents exist :) do you think the man page can be clarified a bit? Man page probably not, info documentation is intended to be a bit more wordy in such cases. In info you have: `-p' `--parents' Make any missing parent directories for each argument, setting their file permission bits to the umask modified by `u+wx'. Ignore existing parent directories, and do not change their file permission bits. - any missing seems to be quite self explaining to me, but if you prefer adjusted wording, feel free to propose a change... |