-
Notifications
You must be signed in to change notification settings - Fork 0
/
cool-cmd-shortcut-key.html
252 lines (235 loc) · 12.1 KB
/
cool-cmd-shortcut-key.html
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="7rack" />
<meta name="copyright" content="7rack" />
<meta property="og:type" content="article" />
<meta name="twitter:card" content="summary">
<meta name="keywords" content="Linux, Linux, " />
<meta property="og:title" content="命令行加速 "/>
<meta property="og:url" content="http://www.7rack.info/cool-cmd-shortcut-key.html" />
<meta property="og:description" content="快捷键 Ctrl + a :移到命令行首 Ctrl + e :移到命令行尾 Ctrl + f :按字符前移(右向) Alt + b :按单词后移(左向) Ctrl + u :从光标处删除至命令行首 Ctrl + k :从光标处删除至命令行尾 Ctrl + w :从光标处删除至字首 Alt + d :从光标处删除至字尾 Ctrl + r:逆向搜索命令历史 !!:执行上一条命令 Ctrl + z:挂起命令 Ctrl + d: exit cool cmd sudo !! :以root权限执行上一条命令 :w !sudo tee % :在 Vim 中无需权限保存编辑的文件 ^foo^bar :将上一条命令中的 ..." />
<meta property="og:site_name" content="轨迹" />
<meta property="og:article:author" content="7rack" />
<meta property="og:article:published_time" content="2011-10-05T23:59:00+08:00" />
<meta name="twitter:title" content="命令行加速 ">
<meta name="twitter:description" content="快捷键 Ctrl + a :移到命令行首 Ctrl + e :移到命令行尾 Ctrl + f :按字符前移(右向) Alt + b :按单词后移(左向) Ctrl + u :从光标处删除至命令行首 Ctrl + k :从光标处删除至命令行尾 Ctrl + w :从光标处删除至字首 Alt + d :从光标处删除至字尾 Ctrl + r:逆向搜索命令历史 !!:执行上一条命令 Ctrl + z:挂起命令 Ctrl + d: exit cool cmd sudo !! :以root权限执行上一条命令 :w !sudo tee % :在 Vim 中无需权限保存编辑的文件 ^foo^bar :将上一条命令中的 ...">
<title>命令行加速 · 轨迹
</title>
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.1/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" href="http://www.7rack.info/theme/css/style.min.css?7aeecf36">
<script>
(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-39673245-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<div id="content-sans-footer">
<div class="navbar navbar-static-top">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="http://www.7rack.info/"><span class=site-name>轨迹</span></a>
<div class="nav-collapse collapse">
<ul class="nav pull-right top-menu">
<li ><a href="http://www.7rack.info">Home</a></li>
<li ><a href="http://www.7rack.info/pages/about-me.html">About</a></li>
<li ><a href="http://www.7rack.info/categories.html">Categories</a></li>
<li ><a href="http://www.7rack.info/tags.html">Tags</a></li>
<li ><a href="http://www.7rack.info/archives.html">Archives</a></li>
<li><form class="navbar-search" action="http://www.7rack.info/search.html" onsubmit="return validateForm(this.elements['q'].value);"> <input type="text" class="search-query" placeholder="Search" name="q" id="tipue_search_input"></form></li>
</ul>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row-fluid">
<div class="span1"></div>
<div class="span10">
<article>
<div class="row-fluid">
<header class="page-header span10 offset2">
<h1><a href="http://www.7rack.info/cool-cmd-shortcut-key.html"> 命令行加速 </a></h1>
</header>
</div>
<div class="row-fluid">
<div class="span8 offset2 article-content">
<p>快捷键</p>
<div class="highlight"><pre>Ctrl + a :移到命令行首
Ctrl + e :移到命令行尾
Ctrl + f :按字符前移(右向)
Alt + b :按单词后移(左向)
Ctrl + u :从光标处删除至命令行首
Ctrl + k :从光标处删除至命令行尾
Ctrl + w :从光标处删除至字首
Alt + d :从光标处删除至字尾
Ctrl + r:逆向搜索命令历史
!!:执行上一条命令
Ctrl + z:挂起命令
Ctrl + d: <span class="nb">exit</span>
</pre></div>
<p>cool cmd</p>
<div class="highlight"><pre>sudo !! :以root权限执行上一条命令
:w !sudo tee % :在 Vim 中无需权限保存编辑的文件
^foo^bar :将上一条命令中的 foo 替换为 bar,并执行
cp filename<span class="o">{</span>,.bak<span class="o">}</span> :快速备份或复制文件
</pre></div>
<section>
<p id="post-share-links">
Share on:
<a href="http://twitter.com/home?status=%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%8A%A0%E9%80%9F%20http%3A//www.7rack.info/cool-cmd-shortcut-key.html" target="_blank" title="Share on Twitter">Twitter</a>
❄
<a href="http://www.facebook.com/sharer/sharer.php?s=100&p%5Burl%5D=http%3A//www.7rack.info/cool-cmd-shortcut-key.html" target="_blank" title="Share on Facebook">Facebook</a>
❄
<a href="https://plus.google.com/share?url=http%3A//www.7rack.info/cool-cmd-shortcut-key.html" target="_blank" title="Share on Google Plus">Google+</a>
❄
<a href="mailto:?subject=%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%8A%A0%E9%80%9F&body=http%3A//www.7rack.info/cool-cmd-shortcut-key.html" target="_blank" title="Share via Email">Email</a>
</p>
</section>
<section>
<div class="accordion" id="accordion2">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle disqus-comment-count" data-toggle="collapse" data-parent="#accordion2"
href="http://www.7rack.info/cool-cmd-shortcut-key.html#disqus_thread">
Comments
</a>
</div>
<div id="disqus_thread" class="accordion-body collapse">
<div class="accordion-inner">
<div class="comments">
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = '7rack';
var disqus_identifier = 'http://www.7rack.info/cool-cmd-shortcut-key.html';
var disqus_url = 'http://www.7rack.info/cool-cmd-shortcut-key.html';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
</div>
</div>
</div>
</div>
</section>
<hr/>
<section>
<h2>Related Posts</h2>
<ul class="related-posts-list">
<li><a href="http://www.7rack.info/show-conky.html" title="conky">conky</a></li>
<li><a href="http://www.7rack.info/prettify-desktop.html" title="美化">美化</a></li>
<li><a href="http://www.7rack.info/config-ip.html" title="ip配置">ip配置</a></li>
<li><a href="http://www.7rack.info/install-gamit10-4-on-linux-kernel-3.html" title="linux kernel 3.*.*.*下安装gamit 10.4">linux kernel 3.*.*.*下安装gamit 10.4</a></li>
<li><a href="http://www.7rack.info/linux-performance-analysis-and-tools.html" title="Linux 性能分析及工具">Linux 性能分析及工具</a></li>
</ul>
<hr />
</section>
<aside>
<nav>
<ul class="articles-timeline">
<li class="previous-article">« <a href="http://www.7rack.info/prettify-desktop.html" title="Previous: 美化">美化</a></li>
<li class="next-article"><a href="http://www.7rack.info/config-ip.html" title="Next: ip配置">ip配置</a> »</li>
</ul>
</nav>
</aside>
</div>
<section>
<div class="span2" style="float:right;font-size:0.9em;">
<h4>Published</h4>
<time pubdate="pubdate" datetime="2011-10-05T23:59:00+08:00">10 5, 2011</time>
<h4>Category</h4>
<a class="category-link" href="http://www.7rack.info/categories.html#linux-ref">Linux</a>
<h4>Tags</h4>
<ul class="list-of-tags tags-in-article">
<li><a href="http://www.7rack.info/tags.html#linux-ref">Linux
<span>10</span>
</a></li>
</ul>
<h4>Contact</h4>
<a href="mailto:vimxiang@gmail.com" title="My Email Address" class="sidebar-social-links" target="_blank">
<i class="fa fa-envelope sidebar-social-links"></i></a>
<a href="http://github.com/7rack" title="My Github Profile" class="sidebar-social-links" target="_blank">
<i class="fa fa-github sidebar-social-links"></i></a>
</div>
</section>
</div>
</article>
</div>
<div class="span1"></div>
</div>
</div>
<div id="push"></div>
</div>
<footer>
<div id="footer">
<ul class="footer-content">
<li class="elegant-power">Powered by <a href="http://getpelican.com/" title="Pelican Home Page">Pelican</a>. Theme: <a href="http://oncrashreboot.com/pelican-elegant" title="Theme Elegant Home Page">Elegant</a> by <a href="http://oncrashreboot.com" title="Talha Mansoor Home Page">Talha Mansoor</a></li>
</ul>
</div>
</footer> <script src="http://code.jquery.com/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script>
function validateForm(query)
{
return (query.length > 0);
}
</script>
<script type="text/javascript">
var disqus_shortname = '7rack';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
<script language="javascript" type="text/javascript">
function uncollapse() {
if (window.location.hash.match(/^#comment-\d+$/)) {
$('#disqus_thread').collapse('show');
}
}
</script>
<script type="text/javascript" language="JavaScript">
uncollapse();
window.onhashchange=function(){
if (window.location.hash.match(/^#comment-\d+$/))
window.location.reload(true);
}
</script>
<script>
$('#disqus_thread').on('shown', function () {
var link = document.getElementsByClassName('accordion-toggle');
var old_innerHTML = link[0].innerHTML;
$(link[0]).fadeOut(500, function() {
$(this).text('Click here to hide comments').fadeIn(500);
});
$('#disqus_thread').on('hidden', function () {
$(link[0]).fadeOut(500, function() {
$(this).text(old_innerHTML).fadeIn(500);
});
})
})
</script>
</body>
<!-- Theme: Elegant built for Pelican
License : http://oncrashreboot.com/pelican-elegant -->
</html>