๐Ÿš€ Getting Started with Basic Linux Commands - Day 3 Task

๐Ÿš€ Getting Started with Basic Linux Commands - Day 3 Task

ยท

3 min read

Introduction

Welcome to Day 3 of our Linux journey! Today, we'll dive into some fundamental Linux commands that will empower you to navigate, manage files, and gain insights into your system effortlessly. Whether you're a tech enthusiast or just starting, these commands will become your trusty companions in the Linux world. Let's embark on this exciting adventure together! ๐ŸŒŸ๐Ÿ’ป

1. Viewing File Contents:

๐Ÿ“– To peek into the secrets of a file, use the cat command. For instance, cat filename.txt will display the entire content of the file "filename.txt" in your terminal. Explore your files with ease! ๐Ÿ•ต๏ธโ€โ™‚๏ธ

2. Changing Access Permissions:

๐Ÿ”’ Empower yourself with control over files using the chmod command. For example, chmod 755 file.txt grants read, write, and execute permissions to the owner, and read and execute permissions to the group and others. Take charge of your data! ๐Ÿ’ช

3. Checking Command History:

๐Ÿ“œ The history command lets you view a list of commands you've recently run, a helpful tool for tracking your actions and learning from your past steps. Reflect on your Linux journey! ๐Ÿค”

4. Removing a Directory/Folder:

๐Ÿ—‘๏ธ Ready to tidy up your workspace? The rmdir command removes an empty directory, while rm -r directory will obliterate a directory and its contents, so be cautious! Clean up clutter with confidence! ๐Ÿงน

5. Creating and Viewing File Content:

๐Ÿ“ To create a new file "fruits.txt" and immediately glimpse its insides, type echo -e "Apple\nMango\nBanana\nCherry\nKiwi\nOrange\nGuava" > fruits.txt. Write and explore like a pro! โœ๏ธ๐Ÿ”

6. Showing Top and Bottom Fruits:

๐ŸŽ๐ŸŠ Dive into the juicy details using head and tail commands. head -n 3 fruits.txt displays the top three fruits, and tail -n 3 fruits.txt showcases the bottom three. Savour the essence of your files! ๐Ÿ‰๐Ÿ“

7. Creating and Viewing Another File:

๐ŸŽจ Let's create the "Colors.txt" file and fill it with captivating hues using echo -e "Red\nPink\nWhite\nBlack\nBlue\nOrange\nPurple\nGrey" > Colors.txt. Paint your files with beautiful colours! ๐ŸŽจ๐ŸŒˆ

8. Finding the Difference Between Files:

๐Ÿ•ต๏ธโ€โ™€๏ธ๐Ÿ” Curious to spot dissimilarities? Utilize the diff command, like diff fruits.txt Colors.txt, to reveal the differences between "fruits.txt" and "Colors.txt." Uncover the uniqueness of your files! ๐Ÿงฉ๐Ÿ”Ž

Conclusion

Congratulations on conquering Day 3's Linux tasks! You've learned valuable commands to view, manage, and compare files. Embrace the wonders of Linux, and keep exploring the vast possibilities it offers. With these powerful commands in your arsenal, you're well on your way to becoming a Linux pro! Stay tuned for more exciting Linux adventures ahead! Let's continue learning together and master the art of Linux! ๐Ÿง๐Ÿ’ป #LinuxCommands #TechBeginner #LinuxJourney #TechLearning

Happy Learning!!!

Reference

To develop deeper into the world of DevOps I highly recommend following Shubham Londhe on TrainWithShubham and Bhupinder Rajput on Technical Guftgu.

ย