Tag: Linux file keyword software
UNIT6 basic commands commonly used in Linux
1.diff comparison of two different files
diff-u file file.new >file.path # #生成补丁文件
Yum Install patch-y # #安装打补丁工具
Patch - b file File.path # #给老软件打补丁, clear and backup old software
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/93/44/wKioL1kJs77Rfcz0AAArm81_XM4957.jpg "title=" 36020170503184035091.jpg "alt=" Wkiol1kjs77rfcz0aaarm81_xm4957.jpg "/>
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M00/93/49/wKiom1kJyNqx2SUaAAAwMWllRpo739.jpg "style=" float : none; "title=" 36020170503200918676.jpg "alt=" Wkiom1kjynqx2suaaaawmwllrpo739.jpg "/>
2.grep # #过滤字符
- I. # #或略大小写
- N # #显示结果所在行的行号
- C # #结果个数
- v # #反向过滤
- r keyword Catalogue # #在目录中过滤还有关键字的文件
- E "keyword 1| keyword 2| ..." # #过滤多个关键字
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/93/44/wKioL1kJs-rgT67wAAAx04aocP4898.jpg "title=" 36020170503184132579.jpg "alt=" Wkiol1kjs-rgt67waaax04aocp4898.jpg "/>
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M01/93/49/wKiom1kJyU2TQGvdAAASF626yUM061.jpg "style=" float : none; "title=" 36020170503201207132.jpg "alt=" Wkiom1kjyu2tqgvdaaasf626yum061.jpg "/>
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M02/93/49/wKiom1kJyU3DxScwAAAgAMEQIJM383.jpg "style=" float : none; "title=" 36020170503201220596.jpg "alt=" Wkiom1kjyu3dxscwaaagameqijm383.jpg "/>
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M02/93/48/wKioL1kJyU7THcKAAABbjpJpqNQ261.jpg "style=" float : none; "title=" 36020170503201236044.jpg "alt=" Wkiol1kjyu7thckaaabbjpjpqnq261.jpg "/>
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M01/93/48/wKioL1kJyU6w_79EAAArnlM5ueU305.jpg "style=" float : none; "title=" 36020170503201246805.jpg "alt=" Wkiol1kjyu6w_79eaaarnlm5ueu305.jpg "/>
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/93/49/wKiom1kJycTB1RF0AAAQ7nEwY0w931.jpg "title=" 36020170503201426517.jpg "alt=" Wkiom1kjyctb1rf0aaaq7newy0w931.jpg "/>
Patch Command patch
Patches take the patch file Patchfile (which contains a list of differences generated by diff) and
the differences apply to one or more original files that generate a patch version. Typically , a patched version replaces the original
start file , but when you specify the-B option, you can make a backup. will use the. orig file name suffix
Rename original file
Patches can be used to apply a simple patch file to a single file using the following syntax
–[[email protected] etc]# patch issue Patchfile
Patching file Issue
The following command shows how to use a patch file created through Diff-naur. User changes to
after a comparable directory similar to the original directory from which the patch file was created , a patch is executed
–[[email protected] orig-dir]$ Patch-b </tmp/patchfile
Patching file hosts
Patching file Network
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/93/48/wKioL1kJyNrDXBdtAAAKgI2NbT8985.jpg "title=" 36020170503201009108.jpg "style=" Float:none; "alt=" wkiol1kjynrdxbdtaaakgi2nbt8985.jpg "/>
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/93/49/wKiom1kJyNrgWD4hAAAFEQQROsQ630.jpg "title=" 36020170503201024675.jpg "style=" Float:none; "alt=" wkiom1kjynrgwd4haaafeqqrosq630.jpg "/>
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/93/48/wKioL1kJyNuTkyFJAAAFRYGhN0A236.jpg "title=" 36020170503201035212.jpg "style=" Float:none; "alt=" wkiol1kjynutkyfjaaafryghn0a236.jpg "/>
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/93/48/wKioL1kJyNuCqrWLAAAEoZszBAk170.jpg "title=" 36020170503201044948.jpg "style=" Float:none; "alt=" wkiol1kjynucqrwlaaaeozszbak170.jpg "/>
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/93/46/wKiom1kJs9Lh6EjjAAAttcJyP1g256.jpg "title=" 36020170503184045091.jpg "alt=" Wkiom1kjs9lh6ejjaaattcjyp1g256.jpg "/>
Cut command
Cut is used for text fields or columns in the cut file and
It is displayed to the standard output
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/93/46/wKiom1kJtMXjFtQUAAAmhxrUB-E559.jpg "title=" 36020170503184159611.jpg "alt=" Wkiom1kjtmxjftquaaamhxrub-e559.jpg "/>
650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M02/93/49/wKiom1kJyoHi-DYdAAAqlFbxrhQ409.jpg "title=" 36020170503201441220.jpg "alt=" Wkiom1kjyohi-dydaaaqlfbxrhq409.jpg "/>
3.sort # #排序
- N # #纯数字
- R # #倒序
- u # #去掉重复行
- T # #指定分隔符
- k # #指定排序的列
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/93/44/wKioL1kJtRGQ_KVvAAAnspXPoG0561.jpg "title=" 36020170503184631355.jpg "alt=" Wkiol1kjtrgq_kvvaaanspxpog0561.jpg "/>
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M02/93/50/wKiom1kJ9G6hiGsCAAAa8u5LB7I422.jpg "style=" float : none; "title=" 36020170503231510018.jpg "alt=" Wkiom1kj9g6higscaaaa8u5lb7i422.jpg "/>
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M02/93/4E/wKioL1kJ9G7B1asHAAAWsUMAI0I908.jpg "style=" float : none; "title=" 36020170503231522754.jpg "alt=" Wkiol1kj9g7b1ashaaawsumai0i908.jpg "/>
650) this.width=650; "src=" https://s3.51cto.com/wyfs02/M00/93/50/wKiom1kJ9G6yHVo-AAAVU4mwsBE587.jpg "style=" float : none; "title=" 36020170503231534365.jpg "alt=" Wkiom1kj9g6yhvo-aaavu4mwsbe587.jpg "/>
650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M00/93/4E/wKioL1kJ9G-zQb1fAAAttXRUBBs868.jpg "style=" float : none; "title=" 36020170503231554283.jpg "alt=" Wkiol1kj9g-zqb1faaattxrubbs868.jpg "/>
650) this.width=650; "src=" https://s3.51cto.com/wyfs02/M01/93/50/wKiom1kJ9G_gYBWDAAArJBUhR3g646.jpg "style=" float : none; "title=" 36020170503231611130.jpg "alt=" Wkiom1kj9g_gybwdaaarjbuhr3g646.jpg "/>
650) this.width=650; "src=" https://s3.51cto.com/wyfs02/M01/93/4E/wKioL1kJ9G-zNhEeAABcHEDVfV0497.jpg "style=" float : none; "title=" 36020170503231628539.jpg "alt=" Wkiol1kj9g-znheeaabchedvfv0497.jpg "/>
4.uniq # #处理重复行
- C # #统计重复行的个数
- u # #显示唯一的行
- D # #显示重复行
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/93/46/wKiom1kJtSTCwbpZAAAreqVJtqo883.jpg "title=" 36020170503184649539.jpg "alt=" Wkiom1kjtstcwbpzaaareqvjtqo883.jpg "/>
5.tr # #转换字符大小写
TR ' A-Z ' A-Z <file # #把file中所有小写字符转换成大写
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/93/44/wKioL1kJtiKyxREmAAAcVOkEGiE580.jpg "title=" 36020170503185101035.jpg "alt=" Wkiol1kjtikyxremaaacvokegie580.jpg "/>
6.sed # #控制流输出
sed ' s/nologin/westos/g ' passwd # #替换输出中的nologin为westos
Sed ' 1,5s/nologin/westos/g ' passwd &nbs
650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M02/93/49/wKiom1kJyBmzGnnqAAA2BiAXowo785.jpg "title=" 36020170503200739700.jpg "alt=" Wkiom1kjybmzgnnqaaa2biaxowo785.jpg "/>
650) this.width=650; "src=" https://s3.51cto.com/wyfs02/M01/93/50/wKiom1kJ9KGSW2n3AACUg2apTDE923.jpg "style=" float : none; "title=" 36020170503231717940.jpg "alt=" Wkiom1kj9kgsw2n3aacug2aptde923.jpg "/>
650) this.width=650; "src=" https://s3.51cto.com/wyfs02/M00/93/4E/wKioL1kJ9KGjDb5dAAAowmqJ77A320.jpg "style=" float : none; "title=" 36020170503231732561.jpg "alt=" Wkiol1kj9kgjdb5daaaowmqj77a320.jpg "/>
Linux Learning 134 Unit6