16 cat Command Examples for Linux Beginners

6 Responses

  1. Parijatha Kumar says:

    The following command does not work.
    sudo cat hosts >> /etc/hosts.
    That’s why. I do …
    1) sudo su
    2) cat hosts >> /etc/hosts
    Is there a single command to achieve the result of the above two commands ?

  2. David says:

    Be careful, Examples 4 and 11 are winners of the “Useless use of cat award,” which is often the case when you pipe cat output to another command.

  3. danny says:

    how do you modify the cat command to show only the last paragraph of a textfile

Leave a Reply

Your email address will not be published. Required fields are marked *