Linux commands for DevOps (Commands used in day-to-day activities).

Hello Everyone,
#day3
Basics Linux command
As a challenge #90daysofdevops under Shubham Londhe
#devops #90daysofdevops #trainwithshubham #awscloud
To view what's written in a file.
The
catcommand is used to display the contents of a file on the terminal. For example, to view the contents of a file namedhello.txt, run the following command:
To change the access permissions of files.
The
chmodcommand is used to change the access permissions of files. For example, to give the owner of a file read, write, and execute permissions and everyone else only read and execute permissions, run the following command:
To check which commands you have run till now.
The
historycommand is used to show a list of all the commands you have run in the current terminal session. For example:
To remove a directory/ Folder.
The
rmdir -rcommand is used to remove an empty directory or folder. For example, to remove a directory namedLinux, run the following command:
To create a fruits.txt file and to view the content
The
touchcommand is used to create a new file. For example, to create a file namedfruits.txt, run the following command.You can use the
catcommand to view the contents of the newly created file:
Add content in devops.txt (One in each line) - Apple, Mango, Banana, Cherry, Kiwi, Orange, Guava.
The
vimcommand is used to add content to a file. For example, to add the words "Apple", "Mango", "Banana", "Cherry", "Kiwi", "Orange", and "Guava" to the file nameddevops.txt, one on each line, run the following commands:To Show only Top three fruits from the file.
The
headcommand is used to display the first few lines of a file. For example, to show only the top three fruits from thedevops.txtfile, run the following command:To Show only Bottom three fruits from the file.
The
tailcommand is used to display the last few lines of a file. For example, to show only the bottom three fruits from thedevops.txtfile, run the following command:

To create another file Colors.txt and to view the content.
You can create another file named
Colors.txtusing thetouchcommand:Add content in Colors.txt (One in each line) - Red, Pink, White, Black, Blue, Orange, Purple, Grey.
To view the contents of the newly created file, use the
catcommand:

To find the difference between fruits.txt and Colors.txt file.
use diff command to difference between two files.





