Find the answer to your Linux question:
Results 1 to 2 of 2
Hey Guys, mkdir -p work/{inbox,outbox,pending}/{normal,urgent,important} Can you explain what the above commnd outputs and how it works. Thanks Anuj Sharma...
  1. #1
    Just Joined!
    Join Date
    Sep 2010
    Posts
    1

    Help with Command

    Hey Guys,

    mkdir -p work/{inbox,outbox,pending}/{normal,urgent,important}

    Can you explain what the above commnd outputs and how it works.

    Thanks
    Anuj Sharma

  2. #2
    Linux Newbie
    Join Date
    Dec 2009
    Posts
    241
    Hi,
    mkdir = create directory
    -p if it's needed to create a parent directory first do so
    work/{inbox,outbox,pending}/{normal,urgent,important}
    create the directorys:
    work/inbox/normal
    work/inbox/urgent
    work/inbox/important
    ...
    ...
    ...
    work/pending/important

    So to say it short:
    It's a command to create a little directory tree.

    With { } you can give an array to bash.
    The script will be started with each given value in it.
    P.s.: Hope I got that right, I'm not so sure myself.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...