๐Ÿš€ Day 3 of #90DaysOfDevOps Challenge Done! ๐Ÿš€

๐Ÿš€ Day 3 of #90DaysOfDevOps Challenge Done! ๐Ÿš€

ยท

1 min read

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

    • cat filename

  1. To change the access permissions of files.

    • chmod 777 foldername

    • How do I change directory permissions in Linux?

      To change directory permissions in Linux, use the following:

      • chmod +rwx filename to add permissions

        chmod -rwx directoryname to remove permissions.

        chmod +x filename to allow executable permissions.

        chmod -wx filename to take out write and executable permissions.

Note that โ€œrโ€ is for read, โ€œwโ€ is for write, and โ€œxโ€ is for execute.

This only changes the permissions for the owner of the file.

  1. To check which commands you have run till now.

    • history
  1. To remove a directory/ Folder.

    • rm filename

  1. To create a fruits.txt file and to view the content.

    • vim fruits.txt

    • cat fruits.txt

  2. To Show only top three fruits from the file

    • head -3 <filemane>

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

    • tail -3 <filemane>

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

    • diff fruits.txt colors.txt

ย