Table of contents
No headings in the article.
Welcome back to our DevOps journey! Today, we'll explore some basic Linux commands that are essential for every DevOps engineer. ๐
Let's dive in and discover these commands with a touch of fun and excitement! ๐
1๏ธโฃ Viewing File Content ๐
To satisfy your curiosity and view what's written in a file, you can use the cat
command. It's like peeking into a treasure chest! ๐
Example:
$cat myfile.txt
2๏ธโฃ Changing Access Permissions ๐
Do you want to be the master of your files? Use the chmod
command to change the access permissions and take control! ๐
Example:
$chmod 755 myfile.sh
3๏ธโฃ Checking Command History โณ
Ever wondered how many commands you've conquered on your DevOps journey? The history
command reveals your past triumphs! โ๏ธ
Example:
$history
4๏ธโฃ Removing a Directory ๐๏ธ
When it's time to bid farewell to a directory or folder, the rm
command comes to the rescue! ๐ซ
Example:
$rm -r mydirectory
5๏ธโฃ Creating and Viewing a File ๐
To create a file full of fruity goodness, use the touch
command, like planting a seed. Then, use cat
to view the vibrant content of the file! ๐๐๐
Example:
touch fruits.txt
cat fruits.txt
6๏ธโฃ Adding Content to a File ๐๏ธ
Get your virtual paintbrush ready! Use the echo
command followed by the redirection symbol (>>
) to add colorful fruits to the "devops.txt" file. Each fruit on a new line, like a painter's strokes! ๐จ
Example:
$echo "Apple" >> devops.txt
$echo "Mango" >> devops.txt
$echo "Banana" >> devops.txt
7๏ธโฃ Showing Top Three Fruits ๐ฅ๐ฅ๐ฅ
To pick the cream of the crop, use the head
command with the -n
option and specify 3
. It's like awarding medals to the top three fruits! ๐
Example:
$head -n 3 devops.txt
8๏ธโฃ Showing Bottom Three Fruits ๐ฅญ๐๐
Now, let's give some love to the underdogs! The tail
command with the -n
option and 3
as the argument shows the bottom three fruits, like hidden gems waiting to be discovered! ๐
Example:
$tail -n 3 devops.txt
9๏ธโฃ Creating and Viewing Another File ๐
Time to unleash your creativity! Use the touch
command again to create the "Colors.txt" file. Then, use cat
to view the enchanting colors written inside. It's like stepping into a vibrant rainbow! ๐
Example:
$touch Colors.txt
$cat Colors.txt
๐ Finding the Difference ๐
To spot the dissimilarities between our fruity and colorful files, employ the diff
command. It unveils the unique aspects, like playing spot-the-difference between two pictures! ๐ต๏ธโโ๏ธ
Example:
$diff fruits.txt Colors.txt
And there you have it! These basic Linux commands have become your trusty companions on this DevOps adventure. ๐
Keep exploring, stay curious, and be amazed at the wonders of the Linux command line! ๐ก
Remember to share your progress on LinkedIn and let's continue this amazing journey together. Feel free to connect with me and share your experiences. ๐
Happy command-line adventures! ๐๐ง
Hope you like my blog...!
if u like the content follow me on LinkedIn: https://www.linkedin.com/in/ashok-sana
Follow my Whatsapp & telegram community: https://chat.whatsapp.com/BzX1aruZIH645l29LxvgO3
Happy learning......!