Posts

Showing posts from June, 2021

Linux CAT command

Image
Introduction CAT Command 'cat' command concatenate files to the Standard Output. The name of this command is derived from 'concatenate' function it performes. It is very popular in Linux/Unix Operating Systems to read input stream/file and prints to Standard output stream. Cat comes with really helpful options/switches to get the desired output. Checkout video below for CAT command's basic usage with examples: CAT Options and usage Create a new file Creating a new file using CAT is simple. Let's say we want to create a new file with name foo.txt. Just use below command in terminal. cat > foo.txt Above command uses '>'(greater than) symbol to tell the system that we are going to create new file. Cat will ask for the input content of the files. Write content for the file and press Ctrl+d. foo.txt will be created with the content provided.