Find a file and replace the contents of the file
[Email protected] ~/data]# find/root/data/-type f-name '
. txt '
./oldboy.txt
./acheng.txt
./magua.txt
./op.txt
1. Method one [[email protected] ~/data]# find/root/data/-type f-name '. txt '-exec sed-i ' s#sh#hs#g '
[email protected] ~/data]# cat Oldboy.txt
2. Method 2
[Email protected] ~/data]# find-type f-name ' *.txt ' |xargs sed-i ' s#sh#hs#g '
Second, PS1 environment variables
1. Temporary closure:
[[email protected] data] #echo $PS 1
[\[email protected]\h \w]\$
[[email protected] data] #export ps1= ' [\[email protected]\h \w]\$ '
2. Permanently closed:
Enter vim and press O to enter the next line for editing
: Wq Save Exit
3. Effective Documents: Source/etc/profile
Third, close SELinux
1. Temporary closure:
[[email protected] ~/data] #getenforce
Disabled
[[email protected] ~/data] #setenforce
2. Permanently closed:
[[email protected] ~/data] #vim/etc/selinux/config
: Wq
Four, close the firewall
1. Temporary closure
[[email protected]/oldboy]#/etc/init.d/iptables stop
[Email protected]/oldboy]#/etc/init.d/iptables status
2. Permanently closed
V. Modifying the character Set
1. View the character set
2. Temporary modification
S-process=image/watermark,size_16,text_qduxq1rp5y2a5a6i,color_ffffff,t_100,g_se,x_10,y_10,shadow_90,type_ zmfuz3pozw5nagvpdgk= "alt=" Linux operations seventh----Linux Basic optimization "/>
Results appear:
3. Permanent modification
Modification is not recommended, we currently use UTF-8 is the most widely used international.
View/etc/sys
[[email protected] ~/data] #cat/etc/sysconfig/i18n
[[email protected] ~/data] #vim/etc/sysconfig/i18n
Effective Documents:
[Email protected]/oldboy]# source/etc/sysconfig/i18n
[Email protected]/oldboy]# echo $LANG
Linux Operations seventh----Linux Foundation optimization