Combining Files
Learn how to combine files using the CLI and how to read large files using the more command.
We'll cover the following...
Reading multiple files
The cat command is the go-to tool for looking at the contents of small files. If we send multiple files to the cat command, it’ll read them all in the specified order. Let’s try it. We first create two files in our current directory:
$ echo "Hello" > hello.txt
$ echo "Goodbye" > goodbye.txt
Now, let’s use the cat command to read both files:
$ cat hello.txt goodbye.txt
Run the commands on the terminal below.
As we can see, the output shows the content of both files. The cat command is actually designed to concatenate files. And as we’ve seen already, we can redirect standard output to a file using the > symbol.
Using the > operator
Let’s see this in action. Websites often have a common header and footer. Instead of repeating that content ...
 Ask