How can I copy several binary files into one file on a Linux system? How can I copy several binary files into one file on a Linux system? bash bash

How can I copy several binary files into one file on a Linux system?


Unix has no distinction between text and binary files, which is why you can just cat them together:

cat file1 file2 > target_file


cat is a very useful utility that will output the content of one or more files to standard output. That can be redirected with shell-funcionality into a file. It will work with binary or ascii files. In some programming languages that do not use linking, cat is used to merge binary files into a single executable file.

cat file1 file2 > target_file