What is the most important thing now? Of course is the ability to work and efficiency, many of the use of Linux system partners have encountered a problem, want to import the database, if a file of a file import, the process is slow, delaying time, thereby reducing the efficiency. So want to find a new way, you can synthesize a number of files, so that not only easy to import, but also fast, seems to be a good way to do it! The following small series to teach you how the Linux system will be a number of files together to become one, hope for everyone useful!
In the IDB Cloud found that the exported database files are SQL files generated per table, so many separate files are troublesome to import into other databases, and all SQL files need to be merged into one complete SQL file. With this idea, we decided to find a way to achieve it.
Linux or Unix-like implementation merges multiple file contents into a single file
The code is as follows
Cat B1.sql b2.sql B3.sql "B_all.sql
Or
Cat *.sql "Merge.sql
Finally, we can get a complete file of the content.
This method is useful for merging all text-formatted files into a content merge, as well as keeping all source code in order.
The above method can effectively help to combine multiple files into one, not only improve work efficiency, but also convenient operation, some want to save time when people can try!