Merge files under Linux - how it works
In this practical tip you will learn how to merge files under Linux.
How to merge files in Linux
As a first step, open the console with the key combination [Ctrl] + [Alt] + [T] or enter the command "Terminal" in the search bar. Use the cd command to navigate to the directory in which the files are located.
- With the command "cat filename1 filename2> target file" you can put together text files, zip objects and even .avi files.
- Be sure to enter the file extensions of the individual files in the terminal. Otherwise you will receive an error message.
- For example, if you type "cat textfile.txt textfile2.txt> targetfile.txt" into the console, Linux creates the new target file in the same directory. The other two files remain and are not deleted. The file that you name first in the command represents the beginning of the target document.
Another practical tip shows you how to compare files under Linux.