Examples

Make a directory named Harry in your current directory and a directory named Chest in /tmp:

mkdir Harry /tmp/Chest

Make a directory named Harry in your current directory and force the directory permissions to everything for user, read, and execute (search) for group, and nothing for others. (See the "How Permissions Work" section in this chapter.)

mkdir -m u=rwx,g=rx,o-rwx Harry

Repeat the preceding directions, only using a numeric mode specification:

mkdir -m 750 Harry

Create the directory Chest as a subdirectory of the directory Harry in your current directory. Also, create Harry if it doesn't exist:

mkdir -p Harry/Chest

Was this article helpful?

0 0

Post a comment