Day 3 : Basic Linux commands

This is #90DaysofDevops challenge under the guidance of ShubhamLondhe sir
- To view what's written in a file.
“cat filename”

- To change the access permissions of files.
“chmod 777 foldername”

- To check which commands you have run till now.
“history”

To remove a directory/ Folder.
“rm filename” -> to remove the file
“rmdir foldername” -> to remove folder
“rm –r foldername” -> to remove folder recursively

To create a fruits.txt file and to view the content
“vim fruit.txt”
“cat fruit.txt”
Save and exit: If you want to save your changes and exit Vim, you can use the :wq command.

- Add content in devops.txt (One in each line) - Apple, Mango, Banana, Cherry, Kiwi, Orange, Guava.
Use command “vim devops.txt” and add the fruit one by one

- To Show only top three fruits from the file.
“cat devops.txt | head -3” is used to show only top 3 fruit from file.

To Show only bottom three fruits from the file.
“cat devops.txt | tail -3” is used to show only top 3 fruit from file.

To create another file Colors.txt and to view the content.
Use the command “vim color.txt” to create new file and add color name one by one
Add content in Colors.txt (One in each line) - Red, Pink, White, Black, Blue, Orange, Purple, Grey.

To find the difference between devops.txt and Colors.txt files.
“diff devops.txt color.txt” this command is used to find the difference between two files.
About the author
I'm a passionate .NET developer with a growing interest in DevOps. With a strong foundation in .NET technologies, I'm dedicated to crafting efficient and scalable software solutions. I'm excited to explore the world of DevOps to streamline development workflows, improve collaboration, and deliver high-quality products
Comments
Join the discussionNo comments yet. Be the first to comment.

