How to Create Directory and Change Permission With Single Command

Overview

Command Line Quiz

  • Let’s check our command line knowledge
  • To solve this quiz you have to tell single command (In below comments box) which can create new directory and change its Permission to 600.

Rules

  • No && is allowed
$ mkdir quiz && chmod 600 quiz
  • No ; is allowed
$ mkdir quiz ; chmod 600 quiz

NOTE!: Answer of this quiz will be updated on 10th July 2015.

Answer

$ mkdir -m 600 quiz
$ ls -ld quiz/
drw------- 2 root root 4096 Jul 10 11:36 quiz/


Newsletter

Get updated when I create new content.
Unsubscribe whenever. Never any spam.

Note

I'm Tama. I turn down every ad, affiliate, and sponsor request I get. I write free resources that help people. If you enjoy my content, please consider supporting what I do.

Support my work