Split usage in Linux shell

Source: Internet
Author: User

[email protected] ~]# split [-BL] File PREFIX
Parameters:
-B
: Can be divided into the file size, can be added units, such as B, K, m, etc.;
- L : Split by number of rows.
Example:

Example One: my/etc/termcap has more than 700 k, if want to divide into 300K a file?
[Email protected] ~]# cd/tmp; Split-b 300k/etc/termcap termcap
[Email protected] tmp]# ls-l termcap*
-rw-rw-r–1 root root 307200 August 00:25 Termcapaa
-rw-rw-r–1 root root 307200 August 00:25 termcapab
-rw-rw-r–1 root root 184848 August 00:25 Termcapac
# The file name is free to take! As long as we write the preamble, the small file will be
# Xxxaa, Xxxab, Xxxac and other ways to build a small file!

Example Two: how to synthesize the above three small files into one file, file name Termcapback
[email protected] tmp]# cat termcap* >> termcapback
# It's easy, huh? Just use the data flow redirect. Simple!

Ext.: http://dongyongjun.i.sohu.com/blog/view/165756234.htm

Split usage in Linux shell

Related Article

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.