What Does P Do in Linux?

What Does P Do in Linux?
Contents

-p : A flag which enables the command to create parent directories as necessary. If the directories exist, no error is specified. If we specify the -p option, the directories will be created, and no error will be reported.

What does P mean Linux?

-p is short for –parents – it creates the entire directory tree up to the given directory. E.g., suppose there are no directories in your current directory.

What does P mean in command line?

-p created both, hello and goodbye. This means that the command will create all the directories necessaries to fulfill your request, not returning any error in case that directory exists.

Maya Lin-Takahashi
Author

Maya Lin-Takahashi

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.