# Mastering Essential Linux Commands for DevOps | Day 3 of 90 Days of DevOps Journey  🚀💻

### Introduction

Welcome back to my DevOps learning journey! Today, we're diving deeper into essential Linux commands that will skyrocket our efficiency and automation skills, particularly in file operations. These commands are fundamental to DevOps success, enabling us to streamline workflows and enhance productivity. Join me as we explore these powerful Linux commands and unlock their potential in file management!

### View File Contents 📄

The `cat` command displays the contents of a file, allowing us to see the text or data stored within.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689654022445/c154567c-a348-4ab5-9b69-72102c7aec0c.png align="center")

### Change Access Permissions 🔒

The `chmod` command modifies the access permissions of files, controlling who can read, write, or execute them.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689698206404/050c5b99-8e50-4bce-9a7c-21ec5d0d498c.png align="center")

### Check Command History ⏰

The `history` command shows a list of previously executed commands, giving us a recap of our command-line journey.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689698284576/85add4cd-95dd-49e6-b5bf-558296983a09.png align="center")

### Remove a Directory/Folder 🗑️

The `rmdir` command deletes a directory or folder, allowing us to remove unnecessary file structures.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689698730890/42b95f75-e5da-4b96-83c3-891e3de630db.png align="center")

### Create and View File Content 📝

The `touch` command creates a file and the `cat` command displays its contents, enabling efficient file creation and viewing.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689699611129/b0288498-5106-46a7-a4a6-87d5cbbfcc4a.png align="center")

### Add Content to "devops.txt" 📝

The `echo` command adds content to the **devops.txt** file, allowing us to append data line by line.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689699874730/277cd7a4-e8d2-4795-aeda-66e18de34d4f.png align="center")

### Show Top Three Fruits from the File 🔝

Description: The `head` command displays the top three fruits from the "devops.txt" file, helping us extract specific lines from the file.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689700027179/2088af4f-9c54-43e3-8f31-ededd2462bcd.png align="center")

### Show Bottom Three Fruits from the File🔻

Description: The `tail` command reveals the bottom three fruits from the "devops.txt" file, extracting the desired lines from the file's end.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689700085022/20885499-398a-449d-bdc5-333820f09f96.png align="center")

### Create and View Content in "Colors.txt" 📂

Similar to "fruits.txt," the `touch` command creates a "Colors.txt" file, and the `cat` command displays its contents, facilitating efficient file creation and viewing.

* `touch Colors.txt`
    
* `cat Colors.txt`
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689700279124/906f71bf-8cc8-453c-ba9c-75f9bc93daf6.png align="center")

1. Add Content to "Colors.txt" 📂
    
    The `echo` command adds various colors to the "Colors.txt" file, allowing us to append data line by line.
    
    `echo -e "Red\nPink\nWhite\nBlack\nBlue\nOrange\nPurple\nGrey" > Colors.txt`
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689700511446/185dcd12-dc90-4615-8c7f-2735f84d294b.png align="center")
    
2. Find Differences Between "fruits.txt" and "Colors.txt" Files 🔄
    
    The `diff` command compares the contents of the "fruits.txt" and "Colors.txt" files, highlighting any differences between the two.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689700636690/6fb4977e-dc96-4674-8296-842a2c3359bb.png align="center")
    

Thats it!

Join me on this exciting DevOps journey as we master essential Linux commands for efficient file operations! Stay tuned for daily updates, practical insights, and valuable tips to enhance your DevOps skills.

Remember to like, comment, and share this post if you find it helpful. Let's inspire and support each other on this incredible 90 Days of DevOps adventure!

#DevOpsJourney #LinuxCommands #Efficiency #Automation #TechSkills #LearningCommunity
