Saturday, July 26, 2014

mkdir in linux/unix

  1. First make sure that you are in your home directory. Then, create a new directory with the mkdir command. List your directory after the command completes to prove that it worked:
    
         cd ~
         mkdir newdir
         ls
         
  2. Now create some additional subdirectories within your newdir. List newdir after the command completes to prove that it worked:
    
         mkdir newdir/sub1  newdir/sub2  newdir/sub3
         ls newdir
         
  3. Try to create a directory in a location where you don't have permission. What happens?
    
         mkdir /etc/mydir
         

Reactions:

0 comments:

Post a Comment