What does the 'mkdir -p' command do?

0157

The mkdir -p command is used to create directories in a file system. Here's what it does:

  • mkdir: This is the command to create a new directory.
  • -p: This option allows the command to create parent directories as needed. If the specified parent directory does not exist, it will be created automatically.

For example, running mkdir -p /tools/scanners will create the /tools directory if it doesn't already exist, and then create the scanners directory inside it.

0 Comments

no data
Be the first to share your comment!