Linux method for synthesizing multiple file contents

  
                

When Linux users import multiple files into the database, the discovery process is cumbersome. If you combine multiple files into one file, it will be much simpler. The following small series will introduce you to Linux to combine multiple files into one. Method, interested friends can come to learn.

found in iDB Cloud exported database file is generated for each table SQL file, so many separate files and then imported into other databases is a hassle, you need to merge all of the SQL files For a complete SQL file. With this idea, I decided to find a way to achieve it.

Linux or Unix-like implementation of merging multiple file contents into one file

Code is as follows

cat b1.sql b2.sql b3.sql 》 b_all.sql< Br>

or

cat *.sql " merge.sql

Finally you can get a complete file.

This method is suitable for merging all text-formatted files, all of which are stored together in order.

The above is how Linux combines the contents of multiple files into one. Especially when there are many files, it is more convenient to merge them into one operation.

Copyright © Windows knowledge All Rights Reserved