Common basic commands for Linux (split)

Source: Internet
Author: User

Split command

Role: Cutting Files

Format:

Split [option] [input] [prefix]

-l Specifies the maximum number of rows for a split file

[Email protected]:~/linux/Split$Cat-N ghostwu.txt1What is Memcached?2Free &Open Source,3high-Performance,4Distributed memoryObjectcaching System,5GenericinchNature6But intended forUseinchspeeding up Dynamic Web applications by alleviating database load. 7Memcached is aninch-memory Key-value Store forsmall chunks of arbitrary data8(strings, objects) from results of database calls9API calls, or page rendering. TenMemcached is simple yet powerful.  OneIts simple design promotes quick deployment, AEase of development -And solves many problems facing large data caches.  -It API is available forMost popular languages.

Put ghostwu.txt this file, maximum 6 lines per file, prefixed with ghostwu_

[Email protected]:~/linux/Split$lsGhostwu.txt[email protected]:~/linux/Split$WC-L Ghostwu.txt -Ghostwu.txt[email protected]:~/linux/Split$Split-L6ghostwu.txt ghostwu_[email protected]:~/linux/Split$lsghostwu_aa Ghostwu_ab ghostwu_ac ghostwu.txt[email protected]:~/linux/Split$WC-L Ghostwu_ab6Ghostwu_ab[email protected]:~/linux/Split$WC-L GHOSTWU_AA6Ghostwu_aa[email protected]:~/linux/Split$WC-L GHOSTWU_AC2Ghostwu_ac

Simple wildcard characters

[Email protected]:~/linux/splitlsghostwu_aa  ghostwu_ab  ghostwu_ac  ghostwu.txt [Email protected]:~/linux/splitWC -L ghostwu_*  6  ghostwu_aa   6 Ghostwu_ab   2   Total

-A: Specifies the length of the suffix of the cut file

[Email protected]:~/linux/splitsplit53  ghostwu.txt ghostwu_[email Protected]:~/linux/splitlsghostwu_aaa  ghostwu_aab  ghostwu_aac  Ghostwu.txt[email protected]:~/linux/splitWC -L ghostwu_*  5  GHOSTWU_AAA  5  ghostwu_aab   4Total

-D: Using a numeric suffix

[Email protected]:~/linux/Split$lsGhostwu.txt[email protected]:~/linux/Split$Split-L5-d ghostwu.txt ghostwu_[email protected]:~/linux/Split$lsghostwu_00 ghostwu_01 ghostwu_02 ghostwu.txt[email protected]:~/linux/Split$WC-L ghostwu_*5ghostwu_005ghostwu_014ghostwu_02 -Total

-B by File size

[Email protected]:~/linux/Split$lsGhostwu.txt[email protected]:~/linux/Split$ls-Lhtotal4. 0K-rw-rw-r--1GHOSTWU GHOSTWU565May -  -: AGhostwu.txt[email protected]:~/linux/Split$Split-B -ghostwu.txt ghostwu_[email protected]:~/linux/Split$lsghostwu_aa ghostwu_ac ghostwu_ae ghostwu.txtghostwu_ab ghostwu_ad ghostwu_af[email protected]:~/linux/Split$ls-lhtotal 28K-rw-rw-r--1GHOSTWU GHOSTWU -May -  -: WuGhostwu_aa-rw-rw-r--1GHOSTWU GHOSTWU -May -  -: WuGhostwu_ab-rw-rw-r--1GHOSTWU GHOSTWU -May -  -: WuGhostwu_ac-rw-rw-r--1GHOSTWU GHOSTWU -May -  -: WuGhostwu_ad-rw-rw-r--1GHOSTWU GHOSTWU -May -  -: WuGhostwu_ae-rw-rw-r--1GHOSTWU GHOSTWU $May -  -: WuGhostwu_af-rw-rw-r--1GHOSTWU GHOSTWU565May -  -: AGhostwu.txt

Common basic commands for Linux (split)

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.