Day3-The Linux Command Center

Day3-The Linux Command Center

How to view what's written in a file?
You can view the content by simply entering the ‘cat’ command in the terminal and pressing Enter.

Syntax: cat file_name

ls command is used to display all files and directories in the current location.

How to change the access permissions of files?
'Chmod' command used to change the access permissions of a file.

Syntax:chmod permissions file_name

How to check which commands you have run till now?
'history' command is used to check the commands you have run till now.

How to remove a directory / Folder?
'rmdir' or 'rm' command is used to permanently remove a directory in Linux.
Syntax:rm folder_name, rmdir folder_name

How to create a fruits.txt file and to view the content and Add content in devops.txt (One in each line) - Apple, Mango, Banana, Cherry, Kiwi, Orange, Guava?
vim fruits.txt - command is used to create a file.
cat fruits.txt - command is used to view the content.

Howto Show only top three fruits from the file?
cat devops.txt | head -n 3 command to see only top three fruits from the file.

How to Show only bottom three fruits from the file?
cat devops.txt | tail -n 3 command to see only bottom three fruits from the file.

How to create a colors.txt file and to view the content and Add content in Colors.txt (One in each line) - Red, Pink, White, Black, Blue, Orange, Purple, Grey?
vim colors.txt - command is used to create a file.
cat colors.txt - command is used to view the content.

How to find the difference between fruits.txt and Colors.txt file?
'diff fruits.txt colors.txt' command is used to find difference between two files.

This is the #Day03 of the #90DaysofDevOps challenge! Hope you found this article informative and useful so please share it with others who might benefit from it.

Thanks for reading this article.

Keep Learning...