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)