Linux Operations seventh----Linux Foundation optimization

Source: Internet
Author: User
Tags closure i18n iptables

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

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.