Skip to content

Wednesday, December 2nd, 2009

New Linux User

GEEKY FUN: Advanced MKDIR Functions

April 18, 2006 by Jon  
Filed under Geeky Fun

The mkdir command is one of the staples of file management on any GNU/Linux system. As it (kinda) sounds, mkdir makes directories. A typical command that I use is:

mkdir somedir

Some things that I didn’t know about mkdir is that you can assign permissions at creation time and you can create a tree of subdirectories right off the bat.

Using mkdir 444 somedir will create a directory named somedir in the root directory and make it read only.

Using mkdir -p somedir/subdir1/subdir2/subdir3 will create a tree structure like:

somedir
|->subdir1
 |->subdir2
  |->subdir3

Who knew?

  • StumbleUpon
  • Digg
  • Facebook
  • Mixx
  • Google
  • TwitThis
  • Reddit
  • Yahoo! Buzz
  • Slashdot
  • E-mail this story to a friend!

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!


About Us | Advertise with us | Blog for EveryJoe | Privacy Policy | Terms of Use
Get This Theme | Sitemap


All content is Copyright © 2005-2009 b5media. All rights reserved.