Command: TR
Description: Replace character
Format TR ' original character ' new character ' can be range character, specified character
Command: Split
Option:-B 50m 1.txt According to the size of the split unit is b without units, units are trillion plus m
-L 1.txt divided by row number
Description: Cut large files, source files will not disappear,
[[email protected] ~]# ls *.txt
1.txt [2345].txt 2.txt 999.txt c.txt D.txt
[[email protected] ~]# ls *.txt |tr ' A-Z ' A-Z '////replace the A-Z in the file of LS into a-Z range replacement
1.TXT
[2345]. Txt
2.TXT
999.TXT
C.TXT
D.TXT
[[email protected] ~]# ls *.txt |tr ' CD ' CA '///C and D in the file of LS to replace C and a respectively
1.txt
[2345].txt
2.txt
999.txt
C.txt
A.txt
////////////////////////////////////////////////////////////////////////////////
Split
-L
[[email protected] home]# ls
Anaconda-ks.cfg
[[email protected] home]# wc-l anaconda-ks.cfg////line number 33
Anaconda-ks.cfg
[Email protected] home]# split-l anaconda-ks.cfg
[[email protected] home]# ls
Anaconda-ks.cfg Xaa xab xac xad
[[email protected] home]# wc-l x*////Line Count
Ten XAA
Ten Xab
Ten Xac
3 Xad
33 Total Dosage
-B
[[email protected] home]# DU-SB anaconda-ks.cfg////size 956b
956 Anaconda-ks.cfg
[Email protected] home]# Split-b anaconda-ks.cfg
[[email protected] home]# ls
Anaconda-ks.cfg Xaa xab xac xad
[Email protected] home]# du-sb xa? The same size
Xaa
Xab
Xac
Xad
Customizing new file names
[Email protected] home]# split-b anaconda-ks.cfg new_
[[email protected] home]# ls
Anaconda-ks.cfg new_aa new_ab new_ac new_ad xaa xab xac xad
//////////////////////////////////////////////////////////////////////////////////////////
Summary: TR ' original character ' new character '///split-l behavior Unit-B size unit
Shell Primer-tr replacement character and split cut large file