In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to split and merge in linux, with a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Operational scenario 1: the difficulty of using split to split files ★ demo release Fedora 32 involves the command split
Split is a file split utility provided by the Linux environment that supports both binary and text files. It is usually built into the system with coreutils and does not need to be installed separately.
Split by siz
Binary files and text files use different options when splitting by size:
Binaries use the-b option to specify the split file size.
Text files use the-C option to specify the split file size.
The two uses are similar, except that:
Split [option] [size] [File to be split] [prefix after split (optional)]
Take split debian-live-10.5.0-amd64-lxqt.iso (approx. 2.4 GB) by 100MB size as an example:
Split-b 100m debian-live-10.5.0-amd64-lxqt.iso debian-live-
You can see that the original file is split into 25 smaller files, from aa to ay:
Debian-live-aa debian-live-ad debian-live-ag debian-live-aj debian-live-am debian-live-ap debian-live-as debian-live-av debian-live-aydebian-live-ab debian-live-ae debian-live-ah debian-live-ak debian-live-an debian-live-aq debian-live-at debian-live-awdebian-live-ac debian-live-af debian-live-ai debian-live-al debian-live-ao debian-live-ar debian-live-au debian- Live-ax scenario 2: using cat to merge files is difficult for ★ demo release Fedora 32 involves commands cat, Diff
Cat is a file connection utility provided by the linux environment that connects files and outputs them to standard output. It is usually built into the system with coreutils and does not need to be installed separately.
It is worth noting that in order to ensure that the merged file is consistent with the original file, you can verify it with the diff command if possible.
Merge split files
Using cat to merge files can be in the format of cat [file.] > [merged file name], which is valid for both binary and text files.
Take the previous debian-live-aa to debian-live-ay as an example, you can use this command when merging:
> cat debian-live-* > debian-live.iso
You can see that the merged debian-live.iso file is generated under the directory.
Debian-live-aa debian-live-ad debian-live-ag debian-live-aj debian-live-am debian-live-ap debian-live-as debian-live-av debian-live-aydebian-live-ab debian-live-ae debian-live-ah debian-live-ak debian-live-an debian-live-aq debian-live-at debian-live-aw debian-live.isodebian-live-ac debian-live-af debian-live-ai debian-live-al debian-live-ao debian-live-ar debian- Live-au debian-live-ax uses diff to validate files
You only need to follow the format of diff [original file] [current file]. If there is no output, it proves that there is no difference between the two files.
Take debian-live-10.5.0-amd64-lxqt.iso and debian-live.iso as an example:
> diff debian-live-10.5.0-amd64-lxqt.iso debian-live.iso > # has no output, which means they are the same. Thank you for reading this article carefully. I hope the article "how to split and merge in linux" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.