In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "Linux file division and merge how to achieve", in the daily operation, I believe that many people in the Linux file division and merge how to achieve the problem, the editor consulted all kinds of data, sorted out a simple and easy-to-use method of operation, hope to answer the "Linux file division and merge how to achieve" the doubt is helpful! Next, please follow the editor to study!
File segmentation under Linux can be achieved through the split command, while file merging is carried out with cat. On the other hand, segmentation can specify two modes: split by number of rows and split by Ann size. File merging under Linux can be achieved through the cat command, which is very simple.
Use split to split files under Linux:
Mode 1: specify the number of file lines after split
For txt text files, you can split the file by specifying the number of lines of the split file.
Command:
Split-l 300 large_file.txt new_file_prefix
Mode 2: specify the split file size
For binary files such as executable files, the file cannot be split by the number of file lines, and we can specify the split size to separate the file.
Command:
Split-b 10m large_file.bin new_file_prefix
We can also separate binaries by file size.
Use cat to merge files under Linux:
Command:
Cat small_files* > large_file
English interpretation of Linx file partition command:
-, read standard input. Mandatory arguments to long options are mandatory for short options too. -a,-- suffix-length=N use suffixes of length N (default 2)-b,-- bytes=SIZE put SIZE bytes per output file-C,-- line-bytes=SIZE put at most SIZE bytes of lines per output file-d,-- numeric-suffixes use numeric suffixes instead of alphabetic-l,-- lines=NUMBER put NUMBER lines per output file at this point, the study on "how to split and merge Linux files" is over, hoping to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.