Tuesday 29, Apr 2025
We are moved to new domain
Click -> www.ehowtonow.com
Monday, 10 July 2017

mkdir Create directory Linux Command

mkdir

mkdir [options] directories

Create one or more directories. You must have write permission in the parent directory in order to create a directory. See also rmdir. The default mode of the new directory is 0777, modified by the system or user's umask.

Options

-m mode, --mode mode
Set the access mode for new directories. See chmod for an explanation of acceptable formats for mode.

-p, --parents
Create intervening parent directories if they don't exist.

-v, --verbose
Print a message for each directory created.

--help
Print help message and then exit.

--version
Print version number and then exit.

-Z context, --context=context
Set security context in SELinux.

Examples


Create a read-only directory named personal:

mkdir -m 444 personal

The following sequence:

mkdir work; cd work mkdir junk; cd junk mkdir questions; cd ../..

can be accomplished by typing this:

mkdir -p work/junk/questions

Reference : http://www.linuxdevcenter.com

Shop and help us

Flipkart Offer Snapdeal offer Amazon.in offer Amazon.com offer

Related Posts:

  • Create or change a password using passwd Linux Command passwd passwd [options] [user] Create or change a password associated with a user name. Only the owner or a privileged user may change a password. Owners need not specify their user name. Users can change their own passwo… Read More
  • Patch Linux Command patch patch [options] [original [patchfile] ] Apply the patches specified in patchfile to original. Replace the original with the new, patched version; move the original to original.orig or original~. The patch file is a d… Read More
  • fuser Linux Command fuser fuser [options] [files | filesystems] Identifies and outputs the process IDs of processes that are using the files or local filesystems. Each process ID is followed by a letter code: c if process is using file as the… Read More
  • ssh-keyscan - Linux Commands ssh-keyscan ssh-keyscan [options] Gather public and private host keys from a number of hosts. Can be used in scripts. Options -4 Use IPv4 addresses only. -6 Use IPv6 addresses only. -f file Read hostnames or addrlist… Read More
  • grep Linux Command grep grep [options] pattern [files] Search one or more files for lines that match a regular expression pattern. Regular expressions are described in Chapter 7. Exit status is 0 if any lines match, 1 if none match, and 2 fo… Read More
  • Blogger Comments
  • Facebook Comments
  • Disqus Comments

0 comments:

Post a Comment

Item Reviewed: mkdir Create directory Linux Command Rating: 5 Reviewed By: eHowToNow