1. Introduction.......................................................................................................................
2. Assignment Task..............................................................................................................
2.1. Creating New Directories......................................................................................
Task 1:..........................................................................................................................
2.2. Removing Existing Files and directories...............................................................
Task 2:..........................................................................................................................
Task 3:.........................................................................................................................
2.3. Usage of the echo command................................................................................
Task 4:..........................................................................................................................
Task 5:.........................................................................................................................
Task 6:.........................................................................................................................
2.4. Usage of the ls command.....................................................................................
Task 7:..........................................................................................................................
Task 8:.........................................................................................................................
2.5. Usage of the cat command.................................................................................10
Task 9:........................................................................................................................10
Task 10:.....................................................................................................................11
Task 11:.....................................................................................................................12
Task 12:.....................................................................................................................13
Task 13:.....................................................................................................................14
2.6. Usage of the chmod command...........................................................................15
Task 14:......................................................................................................................16
Task 15:.....................................................................................................................18
2.7. Usage of the grep command...............................................................................22
, Task 16:......................................................................................................................22
2.8. Aliasing....................................................................................................................26
Task 17:......................................................................................................................26
Task 18:.....................................................................................................................27
Task 19:.....................................................................................................................28
Task 20:.....................................................................................................................28
Task 21:.....................................................................................................................28
Task 22:.....................................................................................................................29
2.9. Usage of your own command..................................................................................30
Task 23:......................................................................................................................30
Task 24:.....................................................................................................................30
Task 25:.....................................................................................................................30
2.10. Command history..................................................................................................30
Task 26:......................................................................................................................30
Task 27:.....................................................................................................................31
Task 28:.....................................................................................................................31
Table of Figures
Figure 1: Creating NBA directory and its subdirectories. .................................................
2
Figure 2: Displaying the structure. ...................................................................................
2
Figure 3: Creating files in Miami directory. ...................................................................... 3
Figure 4: Displaying the files in Miami directory. ............................................................. 3
,Figure 5: Removing Miami directory and its files. ............................................................
4
Figure 6: Displaying NBA directory.................................................................................. 4
Figure 7: Usage of echo utility. ........................................................................................ 5
Figure 8: Changing directory to Lakers. .......................................................................... 5
Figure 9: Executing a group of command-I. .................................................................... 6
Figure 10: Executing a group of command-II. ................................................................. 6
Figure 11: Executing a group of command-III. ................................................................ 7
Figure 12: Usage of ls command. ................................................................................... 7
Figure 13: Usage of ls -a command. ............................................................................... 8
Figure 14: Usage of ls -al command................................................................................ 9
Figure 15: Executing a group of command-IV. ................................................................ 9
Figure 16: Usage of ls -R command. .............................................................................
10
Figure 17: Creating testX file in Chicago Bulls directory using cat utility. ......................
11
Figure 18: Creating testY file in Chicago Bulls directory using cat utility. ......................
11
Figure 19: Creating testZ file in Chicago Bulls directory using cat utility. ...................... 11
Figure 20: Display of testX file using cat utility. ............................................................. 12
Figure 21: Display of testY file using cat utility. ............................................................. 12
Figure 22: Display of testZ file using cat utility. ............................................................. 12
Figure 23: Copying files from Chicago Bulls to Brooklyn nets directory. ....................... 13
Figure 24: Concatenate of the files: testX, testY, and testZ using cat utility. .................
14
Figure 25:Concatenate and display testResult using cat. ..............................................
15
Figure 26: Usage of cat utility. ....................................................................................... 16
Figure 27: Display access permissions for files in Chicago Bulls. .................................
17
Figure 28: Remove all access for testX file. .................................................................. 17
Figure 29: Display access permission for testX file. ...................................................... 17
Figure 30: Try reading testX file. ................................................................................... 18
Figure 31: Try writing into testX file. .............................................................................. 18
, Figure 32: Add read and write access permission for testX file. ....................................
18
Figure 33: Display access permissions for testX file. .................................................... 19
Figure 34: Try reading testX file. ................................................................................... 19
Figure 35: Try writing into testX file. .............................................................................. 19
Figure 36: Change to the NBA directory. .......................................................................
20
Figure 37: Display access permission for Chicago directory. ........................................
20
Figure 38: Remove access permission for Chicago Bulls directory. ..............................
20
Figure 39: Display access permission for Chicago Bulls. ..............................................
21
Figure 40: Try to read a file from Chicago Bulls using any utility. ..................................
21
Figure 41: Try to put a file into Chicago Bulls using any utility. ..................................... 21
Figure 42: Try to search in Chicago Bulls using ls command. .......................................
21 Figure 43: Add read, write, and execute access permissions for the Chicago Bulls
directory. ....................................................................................................................... 22
Figure 44: Display access permissions for Chicago Bulls. ............................................
22
Figure 45: Try to read a file from Chicago Bulls using cat utility. ...................................
22
Figure 46: Try to put a file into Chicago Bulls using touch utility. .................................. 23
Figure 47: Try to search in Chicago Bulls using ls command. .......................................
23
Figure 48: Change to the Brooklyn nets directory. ........................................................ 23
Figure 49: Usage of grep -i. ...........................................................................................
24
Figure 50: Usage of grep -ii. .......................................................................................... 24
Figure 51: Usage of grep -iii. ......................................................................................... 24
Figure 52: Usage of grep -iv. ......................................................................................... 25
Figure 53: Usage of grep -v. ..........................................................................................
25
Figure 54: Usage of grep -vi. ......................................................................................... 26