[100]linux Common Command Parameters Summary

Source: Internet
Author: User

1.mkdir2.ls-l-D Displays the directory-F to the end of the folder Plus/ID-A to. Start with hidden files-rt in reverse chronological order of modification (most recently modified at the bottom) Ls-lhrt #最新的在下面 3.CD4.P Wd5.touch6.vi7.vim8.echo mate > >>-N non-newline-e content carry escape (\ n enter \ t tab) $echo-E ' mao\ntai ' 9.cat-n display line number 10.xar Gs-n numbers. Group echo stu{1..20}.md|xargs-n 1 > 1.md find. -type F|xargs sed-i ' s#<script type= "Text/javascript" Src=http://%4%66ccxxx&[email protected]#@[email     protected]#[email protected]$%@#[email protected]#$></script># #g '; Find. -type f-name ' 1.md ' |xargs-i mv {}/tmp/11.cp-a is equivalent to-pbr-f (force)-R (Recursive) recursion 12.rm 1. Take TMP as Recycle Bin 2. CD first. Find. -name "" |xargs rm-f13.mv14.find:http://www.cnblogs.com/iiiiher/p/8507948.html-type F (file) d (directory) C (charact ER) b (block) s (socket) L (link)-name-size-mtime modified: +7 (more than 7 days) 7-7 (within 7 days)-maxdepth Find depth! Reverse. The-A (and) intersection (default). -O or set-exec find. -type f-name ' 1.md ' |xargs-i mv {}/tmp/find. -type F-MTIME +7 |xargs rm-f find. -type f-mtime +7-exec rm-f {} \;15.grep: Three musketeers old three-V exclusion: Production monitoring process: Ps-ef|grep "/sshd" |grep-v "grep"-abc-e equivalent to EGR EP ' 1|2 '-o shows only matches to the content-N to match to the displayed line number of the-e =egrep. You can filter multiple (or). Cat svc.txt|grep-e "Rsyslog|sshd|network|crond|sysstat" |awk ' {print ' Chkconfig '. $. On "} '-I is not case-sensitive 16.head-n5: Custom head-5 17.tail18.alias19.unalias20.seq sequence-s specified delimiter seq 1 #开始 knot  Bundle SEQ 1 2 #开始 end of tolerance 21.sed-n cancels the default output. Only the output matches the desired-P print. Sed-n ' P a.log; Sed-n ' 20.30 ' p a.log filtering function (Regular): Sed-n '/^d/p ' G is used in conjunction with S. Indicates replacement: Sed-i ' s#maotai#maotai#g ' a.log #是分隔符 sed over Filter function: Ls-l|sed-n '/^d/p ' ls-l|sed-n '/\/$/p ' filter file permissions: Stat maotai.txt |sed-nr ' 4s#^.*\ (0 (. *)/-.*$#\1#GP        ' Filter Ip:ifconfig eth0|sed-nr ' 2s#^.*net (. *) NET.*$#\1#GP ' 22.awk #过滤/output content. A language.  NR line number: awk ' nr>30 && nr<40 ' awk ' nr>30 && nr<40 {print $ {} ' M.txt ' first column     The second column is the entire row:           awk ' {print $1.$2} ' awk ' {print $ ' # ' $ "$} ' awk ' {if ($2>1) print$0} ' Cat svc.txt|grep-e "Rsyslog|sshd|network|crond|sysstat" |awk ' {print "Chkconfig". $. "            On '} ' displays line number: awk ' {print nr.$0} ' filtering function (regular): Regular match: awk '/^d/' (filter directory) Ls-l|awk '/^d/' (Filter directory) Ls-l|awk '/\/$/'-f delimiter. Split with multiple separators awk-f ' [:]+ ' filter file permissions: Stat maotai.txt |sed-nr ' 4s#^.*\ (0 (. *)/-.*$#\1#GP ' filter Ip:ifconfig eth0|sed-nr ' 2s#^.*net (. *) NET.*$#\1#GP ' 23.useradd24.passwd non-interactive Change password: echo " 12345 "|PASSWD--stdin maotai25.uname:-M #--machine 32or64-r #--release kernel version-a #--all-n #--nodename 26.27.2 8.init: Toggles the runlevel. Follow the corresponding level of numbers. For example: Init 6 restarts.     Init 0 shutdown. 29.shutdown-h now-r # reboot-h # halt30.reboot (init 6) reboot. Shutdown-r now31.history (histsize=1000 control. Bash_history the number of strips, first emptied after setting)-C #Clear清空所有历史-D #删除某一条记录, hist ory-d 222-r #清除当前session的-W #WriTe updates immediately. Bash_history Last >/var/log/wtmp # successful login user Lastb >/var/log/btmp # try to sign in information Lastlog >/var/ Log/lastlog # Show recent login information [set Linux system History related variables, command time, save history number, multi session sharing history] (http://coolnull.com/4013.html) [ Reference: Escape from Clear history] (http://topspeedsnail.com/clear-last-linux-login-log/) >/var/log/wtmp>/var/log/btmp>/var/ Log/lastlog>/root/.bash_history #如果要删除某几条. Then e-not log $ < space >command/etc/profile histsize= 1000 set to 0. Do not log histsize=3000 # Histsize defines the number of records that the history command outputs. histfilesize=3000 # Histfilesize defines the total number of records saved in the. bash_history command.    Histsize=0 # Disable HISTORY32.DMESEG # Displays system fault information 33.ifup and Ifdown. # start stop nic 34.nl number lines # show file line numbers 35.less # and more opposite. Enter one line at a time. Press B to rewind one screen at a time. 36.more (infrequently used) press the page one screen at a time. Cannot fallback 37. Wc-l (lines) # show Total row count production monitoring process: Ps-ef|grep "/sshd" |grep-v "grep" |wc-l38.chkconfig (/etc/rc.local) # Set boot from boot. Default management 2,345 level--list # Show All--list sshd--level 234 chkconfig sshd on/ofF chkconfig--level 234 sshd on/off chkconfig--list #列出所有的系统服务 chkconfig--a       DD httpd #增加httpd服务 chkconfig--del httpd #删除httpd服务 chkconfig--level httpd 2345 on In the case of #设置httpd在运行级别为2, 3, 4, 5 are on (open) state chkconfig--list #列出系统所有的服务启动情况 CHKCO Nfig--list mysqld #列出mysqld服务设置情况 chkconfig--level-mysqld on #设定mysqld在等级3和5为开机运行服务,- -level 339.tar-zcvf-j-x-x-n-p-p-c # Specify where to extract--exclude # Exclude directory or file reference: HTT p://www.cnblogs.com/iiiiher/p/8571517.html tar-cvf test.tgz test/--exclude *.txt--exclude dir140.cut cut take column-D delimiter-F fetch     Column-C character-D with what split-C how many characters-c2-1041.tr # character replacement 42.stat # display file and file system status (view file properties) 43.file # view File type 44.last # View User login information/var/log/wtmp data file 45.lastlog # Displays recent user login information. /VAR/LOG/WTMP46.DF-H47.DUMPE2FS # View internal information (metadata) of the file system 48.tree-l Layer-D directory tree-ld 1 /etc/# Show First level directory 49.id # View user and group information 50.ln # Create soft hard link-s soft (readlink) 51.du-sh # View file and directory size 52.which # from the PATH variable In the path Finder path special variable: path location of all commands of path. Isolate the lang character set variable with a colon

[100]linux Common Command parameter summary

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.