I need to copy the content of a folder which contains binary files to one binary file in another directory.
In Windows I can just use:
copy file1 + file2 targetfile /B
I couldn't find something similar for Linux (I saw an approach with cat
, but I'm unsure if this really works for binary files).
To combine binary files in Power Query Editor, select Content (the first column label) and select Home > Combine Files. Or you can just select the Combine Files icon next to Content.
You can combine binary files using a single command-line method. Let's use the “cat” command to join or merge the binaries. The cat command's most common use is to print a file's contents to the standard output stream. It combines the files and prints the result to standard output.
Use the cp command,but you can use the dd command or mv(move)command,when I've used cp it copied all my files in binary and completely porked them,so type" man cp “ in a terminal and learn how to use cp or dd or mv.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With