Linux Tutorial 04


mkdir – make directories


$ mkdir zikzak_dir_01

$ ls -l
total 4
drwxr-x--- 2 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_01/

$ mkdir zikzak_dir_01 zikzak_dir_02 zikzak_dir_03
mkdir: cannot create directory `zikzak_dir_01': File exists

$ ls -l
total 12
drwxr-x--- 2 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_01/
drwxr-x--- 2 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_02/
drwxr-x--- 2 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_03/

$ mkdir -m 777 zikzak_dir_04

$ ls -l
total 16
drwxr-x--- 2 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_01/
drwxr-x--- 2 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_02/
drwxr-x--- 2 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_03/
drwxrwxrwx 2 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_04/

$ mkdir -m 700 zikzak_dir_05

$ ls -l
total 20
drwxr-x--- 2 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_01/
drwxr-x--- 2 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_02/
drwxr-x--- 2 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_03/
drwxrwxrwx 2 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_04/
drwx------ 2 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_05/

$ mkdir -p letscodeit/zikzak_dir_06/data/in

$ ls -l
total 24
drwxr-x--- 3 zikzak u41687 4096 Jul 21 18:03 letscodeit/
drwxr-x--- 2 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_01/
drwxr-x--- 2 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_02/
drwxr-x--- 2 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_03/
drwxrwxrwx 2 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_04/
drwx------ 2 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_05/

$ ls -l letscodeit/
total 4
drwxr-x--- 3 zikzak u41687 4096 Jul 21 18:03 zikzak_dir_06/

$ ls -l letscodeit/zikzak_dir_06/
total 4
drwxr-x--- 3 zikzak u41687 4096 Jul 21 18:03 data/

$ ls -l letscodeit/zikzak_dir_06/data/
total 4
drwxr-x--- 2 zikzak u41687 4096 Jul 21 18:03 in/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s