What does the number '700' represent when using '-m' option in 'mkdir'?

The number 700 when used with the -m option in the mkdir command represents the permissions set for the newly created directory. Here's the breakdown:

Breakdown of 700:

  • First Digit (7): Permissions for the owner of the directory.

    • 4 (read) + 2 (write) + 1 (execute) = 7
    • This means the owner can read, write, and execute.
  • Second Digit (0): Permissions for the group.

    • 0 means no permissions for the group.
  • Third Digit (0): Permissions for others.

    • 0 means no permissions for others.

Summary:

Using mkdir -m 700 directory_name creates a directory where:

  • The owner has full access (read, write, execute).
  • The group and others have no access at all.

This setting is often used for directories that contain sensitive information, ensuring that only the owner can access it. If you have more questions or need further clarification, feel free to ask!

0 Comments

no data
Be the first to share your comment!