16 cat command examples for beginners in Linux

Pradeep Kumar

I am a huge fan of open source and love to share How To's tutorials on Linux, Cloud and DevOps. I have been working as Linux Consultant, Cloud & DevOps Engineer since 2010

You may also like...

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 *