Day03 ----> 90DaysOfDevOps Challenge @TWS

Day03 ----> 90DaysOfDevOps Challenge @TWS

Task: What is the Linux command to:

  • To view what's written in a file.

$ cat [filename]

image

  • To change the access permissions of files.

$ chmod [mention_permissions] [filename]

image

  • To check which commands you have run till now.

$ history

image

  • To remove a directory/ Folder.

$ rmdir [filename]

$ rm -r [filename]

image

  • To create a fruits.txt file and to view the content.

$ touch [filename]

$ cat [filename]

image

  • Add content in fruits.txt (One in each line) - Apple, Mango, Banana, Cherry, Kiwi, Orange, Guava.

$ vim [filename]

$ vi [filename]

$ nano [filename]

image

image

  • To Show only the top three fruits from the file.

$ head -3 [filename]

image

  • To Show only the bottom three fruits from the file.

$ tail -3 [filename]

image

  • To create another file Colors.txt and to view the content.

$ touch Colors.txt

$ cat Colors.txt

image

  • Add content in Colors.txt (One in each line) - Red, Pink, White, Black, Blue, Orange, Purple, and Grey.

$ vim Colors.txt

image

  • To find the difference between the fruits.txt and Colors.txt files.

$ diff fruits.txt Colors.txt

image

Day 3 Task completed

90DaysOfDevOps Tasks👇

https://github.com/Chaitannyaa/90DaysOfDevOps.git