Task: What is the Linux command to
To view what's written in a file.
We use the cat command to view the content of the file
To change the access permissions of files.
For changing the permission of the file we use chmod command
To change the access permissions of files.
history command is used to display the history of the commands executed by the user
To remove a directory/ Folder.
To remove any file and folder in Linux, we used the rm command. The -r flag stands for Recursive i.e. in simple words it will delete the files first and then the folder.
To create a fruits.txt file and to view the content.
We use the touch command to create the file, To add the content in a file, we have used the vim command, cat command is used to see the file content.
Add content in devops.txt (One in each line) - Apple, Mango, Banana, Cherry, Kiwi, Orange, Guava.
To show only the top three fruits from the file.
To Show only the bottom three fruits from the file.
To create another file Colors.txt and to view the content.
Add content in Colors.txt (One in each line) - Red, Pink, White, Black, Blue, Orange, Purple, Grey.
To find the difference between fruits.txt and Colors.txt file.
Thank you for reading! :)