forked from netkiller/netkiller.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
104 lines (56 loc) · 20 KB
/
Copy pathindex.html
File metadata and controls
104 lines (56 loc) · 20 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>第 3 章 Shell command</title><link rel="stylesheet" type="text/css" href="..//docbook.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><meta name="keywords" content="shell,bash,zsh, awk,sed,curl,expect, grep,sort" /><link rel="home" href="../index.html" title="Netkiller Linux Shell 手札" /><link rel="up" href="../index.html" title="Netkiller Linux Shell 手札" /><link rel="prev" href="../zsh/faq.html" title="2.6. FAQ" /><link rel="next" href="curl.html" title="3.2. getconf - Query system configuration variables" /></head><body><a xmlns="" href="http://www.netkiller.cn/">Home</a> |
<a xmlns="" href="http://netkiller.github.io/">简体中文</a> |
<a xmlns="" href="http://netkiller.sourceforge.net/">繁体中文</a> |
<a xmlns="" href="/journal/index.html">杂文</a> |
<a xmlns="" href="/search.html">Search</a> |
<a xmlns="" href="http://netkiller-github-com.iteye.com/">ITEYE 博客</a> |
<a xmlns="" href="http://my.oschina.net/neochen/">OSChina 博客</a> |
<a xmlns="" href="https://www.facebook.com/bg7nyt">Facebook</a> |
<a xmlns="" href="http://cn.linkedin.com/in/netkiller/">Linkedin</a> |
<a xmlns="" href="https://zb.oschina.net/profile/725072/market">作品与服务</a> |
<a xmlns="" href="mailto:netkiller@msn.com">Email</a><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">第 3 章 Shell command</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="../zsh/faq.html">上一页</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="curl.html">下一页</a></td></tr></table><hr /></div><table xmlns=""><tr><td><iframe src="http://ghbtns.com/github-btn.html?user=netkiller&repo=netkiller.github.io&type=watch&count=true&size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="http://ghbtns.com/github-btn.html?user=netkiller&repo=netkiller.github.io&type=fork&count=true&size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="http://ghbtns.com/github-btn.html?user=netkiller&type=follow&count=true&size=large" height="30" width="240" frameborder="0" scrolling="0" style="width:240px; height: 30px;" allowTransparency="true"></iframe></td></tr></table><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="index"></a>第 3 章 Shell command</h1></div></div></div><div class="toc"><p><strong>目录</strong></p><dl class="toc"><dt><span class="section"><a href="index.html#help">3.1. Help Commands</a></span></dt><dd><dl><dt><span class="section"><a href="index.html#help.man">3.1.1. man - an interface to the on-line reference manuals</a></span></dt><dd><dl><dt><span class="section"><a href="index.html#idm45249931546080">3.1.1.1. manpath.config</a></span></dt><dt><span class="section"><a href="index.html#idm45249931544800">3.1.1.2. 查看man手册位置</a></span></dt><dt><span class="section"><a href="index.html#idm45249931543424">3.1.1.3. 指定手册位置</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="curl.html">3.2. getconf - Query system configuration variables</a></span></dt><dt><span class="section"><a href="directory.html">3.3. Directory and File System Related</a></span></dt><dd><dl><dt><span class="section"><a href="directory.html#dirname">3.3.1. dirname</a></span></dt><dt><span class="section"><a href="directory.html#filename">3.3.2. filename</a></span></dt><dd><dl><dt><span class="section"><a href="directory.html#idm45249931522272">3.3.2.1. 排除扩展名</a></span></dt><dt><span class="section"><a href="directory.html#idm45249931520448">3.3.2.2. 取扩展名</a></span></dt></dl></dd><dt><span class="section"><a href="directory.html#cmd.test">3.3.3. test - check file types and compare values</a></span></dt><dt><span class="section"><a href="directory.html#stat">3.3.4. stat</a></span></dt><dt><span class="section"><a href="directory.html#mkdir">3.3.5. mkdir - make directories</a></span></dt><dt><span class="section"><a href="directory.html#rename">3.3.6. rename</a></span></dt><dt><span class="section"><a href="directory.html#touch">3.3.7. touch</a></span></dt><dt><span class="section"><a href="directory.html#ls">3.3.8. ls - list directory contents</a></span></dt><dd><dl><dt><span class="section"><a href="directory.html#idm45249931503104">3.3.8.1. full-time / time-style 定义日期时间格式</a></span></dt></dl></dd><dt><span class="section"><a href="directory.html#cp">3.3.9. cp - copy files and directories</a></span></dt><dd><dl><dt><span class="section"><a href="directory.html#idm45249931492224">3.3.9.1. copy directories recursively</a></span></dt><dt><span class="section"><a href="directory.html#idm45249931490912">3.3.9.2. overwrite an existing file</a></span></dt><dt><span class="section"><a href="directory.html#idm45249931489504">3.3.9.3. -a, --archive same as -dR --preserve=all</a></span></dt></dl></dd><dt><span class="section"><a href="directory.html#rm">3.3.10. rm - remove files or directories</a></span></dt><dd><dl><dt><span class="section"><a href="directory.html#idm45249931485120">3.3.10.1. -bash: /bin/rm: Argument list too long</a></span></dt><dt><span class="section"><a href="directory.html#idm45249931483824">3.3.10.2. zsh: sure you want to delete all the files in /tmp [yn]?</a></span></dt></dl></dd><dt><span class="section"><a href="directory.html#df">3.3.11. df - report file system disk space usage</a></span></dt><dt><span class="section"><a href="directory.html#du">3.3.12. du - estimate file space usage</a></span></dt><dt><span class="section"><a href="directory.html#tac">3.3.13. tac - concatenate and print files in reverse</a></span></dt><dt><span class="section"><a href="directory.html#split">3.3.14. split - split a file into pieces</a></span></dt><dd><dl><dt><span class="section"><a href="directory.html#idm45249931475504">3.3.14.1. 按行分割文件</a></span></dt><dt><span class="section"><a href="directory.html#idm45249931473232">3.3.14.2. 按尺寸分割文件</a></span></dt></dl></dd><dt><span class="section"><a href="directory.html#find">3.3.15. find - search for files in a directory hierarchy</a></span></dt><dd><dl><dt><span class="section"><a href="directory.html#find.name">3.3.15.1. name</a></span></dt><dt><span class="section"><a href="directory.html#find.regex">3.3.15.2. regex</a></span></dt><dt><span class="section"><a href="directory.html#find.user">3.3.15.3. user</a></span></dt><dt><span class="section"><a href="directory.html#find.perm">3.3.15.4. perm</a></span></dt><dt><span class="section"><a href="directory.html#find.type">3.3.15.5. type</a></span></dt><dt><span class="section"><a href="directory.html#find.delete">3.3.15.6. -delete</a></span></dt><dt><span class="section"><a href="directory.html#find.exec">3.3.15.7. exec</a></span></dt><dt><span class="section"><a href="directory.html#xargs">3.3.15.8. xargs</a></span></dt><dt><span class="section"><a href="directory.html#find.path">3.3.15.9. 排除目录</a></span></dt><dt><span class="section"><a href="directory.html#find.mtime">3.3.15.10. -mtime / -mmin</a></span></dt><dt><span class="section"><a href="directory.html#find.newer">3.3.15.11. --newer</a></span></dt><dt><span class="section"><a href="directory.html#idm45249931434848">3.3.15.12. -print / -printf</a></span></dt><dt><span class="section"><a href="directory.html#idm45249931432672">3.3.15.13. -size</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="package.html">3.4. package / compress and decompress</a></span></dt><dd><dl><dt><span class="section"><a href="package.html#tar">3.4.1. tar — The GNU version of the tar archiving utility</a></span></dt><dd><dl><dt><span class="section"><a href="package.html#idm45249931428032">3.4.1.1. tar examples</a></span></dt><dt><span class="section"><a href="package.html#idm45249931426272">3.4.1.2. gunzip</a></span></dt><dt><span class="section"><a href="package.html#idm45249931424384">3.4.1.3. b2zip</a></span></dt><dt><span class="section"><a href="package.html#idm45249931422496">3.4.1.4. compress</a></span></dt><dt><span class="section"><a href="package.html#idm45249931420576">3.4.1.5. -t, --list</a></span></dt><dt><span class="section"><a href="package.html#idm45249931417936">3.4.1.6. tar: Removing leading `/’ from member names</a></span></dt><dt><span class="section"><a href="package.html#idm45249931415456">3.4.1.7. -C, --directory=DIR</a></span></dt><dt><span class="section"><a href="package.html#idm45249931412848">3.4.1.8. -P, --absolute-names don't strip leading `/'s from file names</a></span></dt><dt><span class="section"><a href="package.html#idm45249931410800">3.4.1.9. --exclude</a></span></dt><dt><span class="section"><a href="package.html#idm45249931408864">3.4.1.10. -T </a></span></dt><dt><span class="section"><a href="package.html#idm45249931407456">3.4.1.11. 日期过滤</a></span></dt><dt><span class="section"><a href="package.html#idm45249931405568">3.4.1.12. 保留权限</a></span></dt><dt><span class="section"><a href="package.html#idm45249931404288">3.4.1.13. -r, --append</a></span></dt><dt><span class="section"><a href="package.html#idm45249931402448">3.4.1.14. 远程传输</a></span></dt><dt><span class="section"><a href="package.html#idm45249931400496">3.4.1.15. 分卷压缩</a></span></dt></dl></dd><dt><span class="section"><a href="package.html#cpio">3.4.2. cpio - copy files to and from archives</a></span></dt><dt><span class="section"><a href="package.html#gzip">3.4.3. gzip</a></span></dt><dt><span class="section"><a href="package.html#zip">3.4.4. zip, zipcloak, zipnote, zipsplit - package and compress (archive) files</a></span></dt><dt><span class="section"><a href="package.html#rar">3.4.5. RAR</a></span></dt><dt><span class="section"><a href="package.html#7zip">3.4.6. 7-Zip</a></span></dt><dd><dl><dt><span class="section"><a href="package.html#idm45249931382880">3.4.6.1. 压缩</a></span></dt><dt><span class="section"><a href="package.html#idm45249931381344">3.4.6.2. 浏览压缩包</a></span></dt><dt><span class="section"><a href="package.html#idm45249931380096">3.4.6.3. 解压</a></span></dt><dt><span class="section"><a href="package.html#idm45249931378752">3.4.6.4. Creates self extracting archive.</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="datatime.html">3.5. date and time</a></span></dt><dd><dl><dt><span class="section"><a href="datatime.html#data.format">3.5.1. 日期格式</a></span></dt><dt><span class="section"><a href="datatime.html#data.d">3.5.2. -d --date=</a></span></dt><dd><dl><dt><span class="section"><a href="datatime.html#idm45249931370528">3.5.2.1. 日期偏移量</a></span></dt><dt><span class="section"><a href="datatime.html#idm45249931362704">3.5.2.2. 时间偏移</a></span></dt></dl></dd><dt><span class="section"><a href="datatime.html#weekday">3.5.3. weekday name</a></span></dt><dt><span class="section"><a href="datatime.html#datatime.utc">3.5.4. UTC</a></span></dt></dl></dd><dt><span class="section"><a href="numeric.html">3.6. Numeric</a></span></dt><dd><dl><dt><span class="section"><a href="numeric.html#idm45249931355792">3.6.1. 数值运算</a></span></dt><dt><span class="section"><a href="numeric.html#seq">3.6.2. seq - print a sequence of numbers</a></span></dt><dt><span class="section"><a href="numeric.html#bc">3.6.3. bc - An arbitrary precision calculator language</a></span></dt></dl></dd><dt><span class="section"><a href="text.html">3.7. Text Processing</a></span></dt><dd><dl><dt><span class="section"><a href="text.html#iconv">3.7.1. iconv - Convert encoding of given files from one encoding to another</a></span></dt><dd><dl><dt><span class="section"><a href="text.html#idm45249931344416">3.7.1.1. cconv - A iconv based simplified-traditional chinese conversion tool</a></span></dt><dt><span class="section"><a href="text.html#idm45249931341504">3.7.1.2. uconv - convert data from one encoding to another</a></span></dt></dl></dd><dt><span class="section"><a href="text.html#expr">3.7.2. 字符串处理命令expr</a></span></dt><dt><span class="section"><a href="text.html#cat">3.7.3. cat - concatenate files and print on the standard output</a></span></dt><dd><dl><dt><span class="section"><a href="text.html#idm45249931334960">3.7.3.1. -s, --squeeze-blank suppress repeated empty output lines</a></span></dt></dl></dd><dt><span class="section"><a href="text.html#nl">3.7.4. nl - number lines of files</a></span></dt><dt><span class="section"><a href="text.html#od">3.7.5. od - dump files in octal and other formats</a></span></dt><dd><dl><dt><span class="section"><a href="text.html#idm45249931329568">3.7.5.1. 16进制</a></span></dt></dl></dd><dt><span class="section"><a href="text.html#tr">3.7.6. tr - translate or delete characters</a></span></dt><dt><span class="section"><a href="text.html#cut">3.7.7. cut - remove sections from each line of files</a></span></dt><dt><span class="section"><a href="text.html#printf">3.7.8. printf - format and print data</a></span></dt><dt><span class="section"><a href="text.html#recode">3.7.9. Free `recode' converts files between various character sets and surfaces.</a></span></dt><dt><span class="section"><a href="text.html#urandom">3.7.10. /dev/urandom 随机字符串</a></span></dt><dt><span class="section"><a href="text.html#col">3.7.11. col - filter reverse line feeds from input</a></span></dt><dt><span class="section"><a href="text.html#apg">3.7.12. apg - generates several random passwords</a></span></dt><dt><span class="section"><a href="text.html#head">3.7.13. head/tail</a></span></dt><dt><span class="section"><a href="text.html#grep">3.7.14. grep, egrep, fgrep, rgrep - print lines matching a pattern</a></span></dt><dd><dl><dt><span class="section"><a href="text.html#idm45249931304512">3.7.14.1. 删除空行</a></span></dt><dt><span class="section"><a href="text.html#miscellaneous">3.7.14.2. -v, --invert-match</a></span></dt><dt><span class="section"><a href="text.html#grep.output">3.7.14.3. Output control</a></span></dt><dt><span class="section"><a href="text.html#grep.context">3.7.14.4. Context control</a></span></dt><dt><span class="section"><a href="text.html#regexp">3.7.14.5. Regexp selection and interpretation</a></span></dt><dt><span class="section"><a href="text.html#fgrep">3.7.14.6. fgrep</a></span></dt><dt><span class="section"><a href="text.html#egrep">3.7.14.7. egrep</a></span></dt></dl></dd><dt><span class="section"><a href="text.html#sort">3.7.15. sort - sort lines of text files</a></span></dt><dd><dl><dt><span class="section"><a href="text.html#idm45249931257264">3.7.15.1. 对列排序</a></span></dt></dl></dd><dt><span class="section"><a href="text.html#uniq">3.7.16. uniq</a></span></dt><dt><span class="section"><a href="text.html#table">3.7.17. 行列转换,表格操作</a></span></dt><dd><dl><dt><span class="section"><a href="text.html#idm45249931244720">3.7.17.1. column - columnate lists</a></span></dt><dt><span class="section"><a href="text.html#idm45249931243344">3.7.17.2. paste - merge lines of files</a></span></dt></dl></dd><dt><span class="section"><a href="text.html#rev">3.7.18. 反转字符串或文件内容</a></span></dt></dl></dd><dt><span class="section"><a href="log.html">3.8. Logging</a></span></dt><dd><dl><dt><span class="section"><a href="log.html#logger">3.8.1. logger - a shell command interface to the syslog(3) system log module</a></span></dt></dl></dd><dt><span class="section"><a href="password.html">3.9. Password</a></span></dt><dd><dl><dt><span class="section"><a href="password.html#idm45249931233568">3.9.1. Shadow password suite configuration.</a></span></dt><dt><span class="section"><a href="password.html#newusers">3.9.2. newusers - update and create new users in batch</a></span></dt><dt><span class="section"><a href="password.html#chpasswd">3.9.3. chpasswd - update passwords in batch mode</a></span></dt></dl></dd><dt><span class="section"><a href="binutils.html">3.10. binutils</a></span></dt><dd><dl><dt><span class="section"><a href="binutils.html#strings">3.10.1. strings - print the strings of printable characters in files.</a></span></dt></dl></dd></dl></div>
<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="help"></a>3.1. Help Commands</h2></div></div></div>
<div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="help.man"></a>3.1.1. man - an interface to the on-line reference manuals</h3></div></div></div>
<div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="idm45249931546080"></a>3.1.1.1. manpath.config</h4></div></div></div>
<pre class="screen">
cat /etc/manpath.config
</pre>
</div>
<div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="idm45249931544800"></a>3.1.1.2. 查看man手册位置</h4></div></div></div>
<pre class="screen">
$ man -aw ls
/usr/share/man/man1/ls.1.gz
</pre>
</div>
<div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="idm45249931543424"></a>3.1.1.3. 指定手册位置</h4></div></div></div>
<pre class="screen">
man -M /home/mysql/man mysql
</pre>
</div>
</div>
</div>
</div><div xmlns="" id="disqus_thread"></div><script xmlns="" type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
//if(document.domain == 'netkiller.github.io'){
var disqus_shortname = 'netkiller'; // required: replace example with your forum shortname
//}else{
//var disqus_shortname = 'neochan';
//}
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script><noscript xmlns="">Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><a xmlns="" href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a><br xmlns="" /><script xmlns="" type="text/javascript" id="clustrmaps" src="//cdn.clustrmaps.com/map_v2.js?u=r5HG&d=9mi5r_kkDC8uxG8HuY3p4-2qgeeVypAK9vMD-2P6BYM"></script><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="../zsh/faq.html">上一页</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="curl.html">下一页</a></td></tr><tr><td width="40%" align="left" valign="top">2.6. FAQ </td><td width="20%" align="center"><a accesskey="h" href="../index.html">起始页</a></td><td width="40%" align="right" valign="top"> 3.2. getconf - Query system configuration variables</td></tr></table></div><script xmlns="">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-11694057-1', 'auto');
ga('send', 'pageview');
</script><script xmlns="" type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F997cd4a7320a82d72cb74d179118f697' type='text/javascript'%3E%3C/script%3E"));
</script><script xmlns="" type="text/javascript" src="/js/q.js"></script></body></html>