Skip to main content

Command Palette

Search for a command to run...

Day3 #90daysofdevopschallenge

90daysofdevopschallenge

Updated
2 min readView as Markdown

#DevOpslearning #Devops #Devopsengineer

Topic-Deep dive into Linux basic commands.

  1. To view what's written in a file.

Command name-cat filename

  1. To change the access permissions of files.

Command name-chmod 777 foldername

  1. To check which commands you have run till now.

Command name-history

  1. To remove a directory/ Folder.

Command name-rm filename

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

touch fruits.txt

cat fruits.txt

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

Command name=echo -e "Apple\nMango\nBanana\nCherry\nKiwi\nOrange\nGuava" > devops.txt

  1. Show only the top three fruits from the file.

Command name=head -n 3 devops.txt

8. Show only the bottom three fruits from the file.

Command name=tail -n 3 devops.txt

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

vim Colour.txt

cat Colour.txt

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

echo -e "Red\nPink\nWhite\nBlack\nBlue\nOrange\nPurple\nGrey" > Colors.txt

  1. To find the difference between fruits.txt and Colors.txt file.

diff fruits.txt Colors.txt

Here's an example of what the output might look like:

1c1

< Apple

---

\> Red

2c2

< Mango

---

\> Pink

3c3

< Banana

---

\> White

4c4

< Cherry

---

\> Black

5c5

< Kiwi

---

\> Blue

6c6

< Orange

---

\> Orange

7c7

< Guava

---

\> Purple

8c8

---

\> Grey

#linuxfundamentals #devops

#trainwithshubham

Shubham Londhe

More from this blog

90daysofdevopschallenge

37 posts