05_creating.sh (684B)
1 #!/bin/sh 2 3 # To create a folder, use the touch command 4 # 5 # $ touch file 6 # $ touch file1 file2 7 # 8 # To create folder, use the make directory command 9 # 10 # $ mkdir folder 11 # $ mkdir folder1 folder2 12 # 13 # You can also create more folders at a single time 14 # 15 # $ mkdir -p dir1/dir2 # enables the parent option because without 16 # it you cannot create more than a layer 17 # deep 18 # $ touch dir1/dir2/file # lets you touch a file deeper 19 # 20 # For your exercise, fix the code that is meant to create a folder that 21 # is at least 3 directories deep with a file named 'file' 22 23 mkdir 24 touch file 25 26 # do not remove the newly created folder just yet