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! ๐