The method of merging multiple file contents into one file under Linux system

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.