Day 3 -  Basics Linux command

Day 3 - Basics Linux command

ยท

2 min read

Task: What is the Linux command to

  1. To view what's written in a file.

    We use the cat command to view the content of the file

  2. To change the access permissions of files.

    For changing the permission of the file we use chmod command

  3. To change the access permissions of files.

    history command is used to display the history of the commands executed by the user

  4. 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.

  5. 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.

  6. Add content in devops.txt (One in each line) - Apple, Mango, Banana, Cherry, Kiwi, Orange, Guava.

  7. To show only the top three fruits from the file.

  8. To Show only the bottom three fruits from the file.

  9. To create another file Colors.txt and to view the content.

  10. Add content in Colors.txt (One in each line) - Red, Pink, White, Black, Blue, Orange, Purple, Grey.

  11. To find the difference between fruits.txt and Colors.txt file.

    Thank you for reading! :)

ย