Day 3 - Exploring Linux Commands ๐Ÿš€

Day 3 - Exploring Linux Commands ๐Ÿš€

ยท

2 min read

Overview ๐Ÿ“‹

Today, we're taking a deeper dive into Basic Linux Commands. Let's sharpen our Linux skills with these hands-on tasks! ๐Ÿ’ป

Viewing File Content ๐Ÿ“„

Use cat to view the content of a file:

๐Ÿ‘๏ธ Tip: This command displays the entire content of the specified file.

Changing Access Permissions ๐Ÿ”

Adjust file permissions with chmod:

  • chmod 777 folder_name

  • chmod 777 file_name

๐Ÿ”’ Tip: Permissions are crucial for security. Use chmod to control who can read, write, or execute a file and folder.

Checking Command History ๐Ÿ•ต๏ธโ€โ™‚๏ธ

See your command history with:

๐Ÿ“œ Tip: history shows a list of recently executed commands.

Removing a Directory ๐Ÿ—‘๏ธ

Delete a directory with:

๐Ÿšซ Tip: Be cautious when using rm -r as it recursively removes the directory and its contents.

Creating and Viewing Files ๐Ÿ“

Create and view the contents of fruits.txt:

๐Ÿ Tip: Use echo to add content to a file.

Displaying Top and Bottom Entries ๐Ÿ“Š

Show the top three and bottom three fruits:

Show Top Three Fruits ๐Ÿฅ‡๐Ÿฅˆ๐Ÿฅ‰

Show Bottom Three Fruits ๐Ÿฅ‰๐Ÿฅˆ๐Ÿฅ‡

๐Ÿฅ‡๐Ÿฅˆ๐Ÿฅ‰ Tip: head and tail display the top and bottom lines of a file, respectively.

Creating and Comparing Files ๐Ÿ“‚

Create and compare fruits.txt and Colors.txt:

๐Ÿ”„ Tip: diff highlights the differences between two files.

Wrapping Up ๐ŸŽ‰

Day 3 conquered! ๐Ÿš€ Today, we mastered Exploring Linux commands, a crucial skill for any DevOps engineer. Keep up the momentum and stay tuned for more challenges ahead! ๐ŸŒŸ

Did you find this article valuable?

Support Nilkanth Mistry by becoming a sponsor. Any amount is appreciated!

ย