📄 344.html
字号:
<br>
The comments are owned by the poster. We aren't responsible for their content.<br>
Re: (Score: 0)<br>
by Anonymous on Sunday, October 20, 2002<br>
Here's something I use now and again:<br>
<br>
find / -type f -exec grep -icH 'regex' '{}' ; | sed -e '/0$/ d' | sed 's/(.*:)([0-9]*)/21/' | sort -n > results.txt<br>
<br>
What this does is search every regular file on your system, greps it for a regex, pipes the output of that through sed a couple of times to remove results with zero hits and to put the number of hits at the front, sorts them by number then puts then in a file.<br>
<br>
Useful when trying to find out how a particular distribution sets stuff for programs; be warned though, it can take a while to complete but that shouldn't be a problem if you need a coffee!<br>
<br>
<br>
[ Reply to This ]<br>
<br>
<br>
Re: by Anonymous on Sunday, October 20, 2002<br>
<br>
Re: Faster Modification (I think) by Anonymous on Sunday, October 20, 2002<br>
<br>
Re: Faster Modification (I think) by Anonymous on Monday, October 21, 2002<br>
<br>
Re: Cool, but... by Anonymous on Monday, October 21, 2002<br>
<br>
Re: (Score: 0)<br>
by Anonymous on Monday, October 21, 2002<br>
<br>
What is the Unix equivalent of Windows' "dir /s"? "dir /s" is like 'ls' but it looks recursively in all subdirectories too. I know 'find' can do something like this, but its man page is practically unreadable.. <:-<br>
<br>
<br>
[ Reply to This ]<br>
<br>
<br>
Re: by Anonymous on Monday, October 21, 2002<br>
<br>
Re: ``dir /s by Anonymous on Monday, October 21, 2002<br>
<br>
Re: recursive dir for UNIX/linux by Anonymous on Monday, October 21, 2002<br>
<br>
Re: by Anonymous on Monday, October 21, 2002<br>
<br>
Re: dir /s by Anonymous on Monday, October 21, 2002<br>
<br>
Re: by Anonymous on Monday, October 21, 2002<br>
<br>
Re: by Anonymous on Monday, October 21, 2002<br>
<br>
Re: by Anonymous on Monday, October 21, 2002<br>
<br>
Re: find by Anonymous on Tuesday, October 22, 2002<br>
<br>
Re: by Anonymous on Monday, October 21, 2002<br>
<br>
Re:dir /s equiv by Anonymous on Monday, October 21, 2002<br>
<br>
Re:dir /s equiv by Anonymous on Monday, October 21, 2002<br>
<br>
Re:dir /s equiv by Anonymous on Monday, October 21, 2002<br>
<br>
zsh: ls **/*.txt by Anonymous on Monday, October 21, 2002<br>
<br>
Re: by Anonymous on Monday, October 21, 2002<br>
<br>
Re: by Anonymous on Tuesday, October 22, 2002<br>
<br>
Re: Other tricks: DU and DF by Anonymous on Wednesday, October 23, 2002<br>
<br>
Re: Other tricks: DU and DF by Anonymous on Wednesday, October 23, 2002<br>
<br>
Re: Other tricks: DU and DF by Anonymous on Thursday, October 24, 2002<br>
<br>
Re:dir /s by Anonymous on Wednesday, October 23, 2002<br>
<br>
Re: line numbering (Score: 0)<br>
by Anonymous on Monday, October 21, 2002<br>
If you don't need anything complicated, cat -n somefile > somefile.numbered can do the trick with numbering lines.<br>
<br>
<br>
[ Reply to This ]<br>
<br>
<br>
Re: line numbering by Anonymous on Tuesday, October 22, 2002<br>
<br>
Re: line numbering by Anonymous on Wednesday, October 23, 2002<br>
<br>
Re: use seq, not fold, for iteration (Score: 0)<br>
by Anonymous on Wednesday, October 23, 2002<br>
The iteration example is less than convincing. Try iterating over a 10 elements. Oops. Try 1000. Huh? ...<br>
<br>
for i in $(echo 12345|fold -w1); do print $i; done<br>
<br>
should be<br>
<br>
for i in `seq 5`; do print $i;done<br>
<br>
seq(1) allows to define start, stop, step and more.<br>
<br>
<br>
[ Reply to This ]<br>
<br>
<br>
Re: use seq, not fold, for iteration by Anonymous on Wednesday, October 23, 2002<br>
<br>
Re: Excellent article. (Score: 0)<br>
by Anonymous on Wednesday, October 23, 2002<br>
Found your site from linux Today.<br>
<br>
My linux tips page:<br>
http://wolfrdr.tripod.com/linuxtips.html<br>
<br>
<br>
[ Reply to This ]<br>
<br>
<br>
Re: "Dogs" of the linux Shell (Score: 1)<br>
by DrScriptt on Wednesday, October 23, 2002<br>
(User Info | Send a Message) http://drscriptt.riverviewtech.net <br>
Now this is a GREAT article!!! I really would like to see more articles like this one.<br>
<br>
I've been using linux for 3+ years now and I LOVE it. I cut my teeth on DOS batch files using DATE, FC, and TIME to do a LOT of what was done here. It was VERY hard, I ended up creating temporary files all over the place that had to be subsequently cleaned up. Unicies on the other hand make it SO easy. I really do enjoy seeing all the CLI tools that are out there and knowing that people are using them. To me using tools like these are what make us unix people. No matter how experienced or inexperienced (me) we may be. Using the system to its potential is what it's there for. Try doing some of these tasks things and more (combine them...) in Windows<br>
<br>
Read the rest of this comment...<br>
<br>
<br>
[ Reply to This ]<br>
<br>
<br>
Re: One-level Deep Directory Listing (Score: 0)<br>
by Anonymous on Wednesday, October 23, 2002<br>
Here's a super simple command line thingy that I use all the time to see the contents of the current directory and one level down:<br>
<br>
daemonbox [1]: ls -AF `ls -A`<br>
<br>
I've aliased it to "l1" for convienence<br>
<br>
note - this is on NetBSD-1.6: YMMV in linux<br>
<br>
<br>
[ Reply to This ]<br>
<br>
<br>
Re: One-level Deep Directory Listing by Anonymous on Thursday, October 24, 2002<br>
<br>
Re: [...]linux Shell, Cygwin anyone? (Score: 0)<br>
by Anonymous on Thursday, October 24, 2002<br>
Just a reminder to those linux/UNIX enthusiasts who have to suffer the Microsoft command line at work... Check out Cygwin for the coolest shell (and X) stuff that runs on Windows.<br>
Rgds, Derek<br>
<br>
<br>
[ Reply to This ]<br>
<br>
<br>
Re: recall things in depth (Score: 0)<br>
by Anonymous on Thursday, October 24, 2002<br>
i just involve a project for a data convertion .<br>
old window software can print report/data to file as file.prn. but the output is dirty, they seperately one record to mutil-line.<br>
and fill record seperator using one blank line.<br>
--------------------------<br>
head , tail just good for capture it.<br>
while [ startLine -lt totalLine ]; do<br>
parse using wc -c to check is empty line<br>
using cat -A , sed to trailing ^M(return) char<br>
use >>,> to join 3/4 line as one record.<br>
done<br>
than port to mysql database<br>
many thanks to arctical author. <br>
</FONT><br>
</TD>
</TR>
<TR>
<TD colSpan=2><FONT
class=middlefont></FONT><BR>
<FONT
class=normalfont>全文结束</FONT> </TD>
</TR>
<TR>
<TD background="images/dot.gif" tppabs="http://www.linuxhero.com/docs/images/dot.gif" colSpan=2
height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
<TD vAlign=top width="20%"
background="images/line.gif" tppabs="http://www.linuxhero.com/docs/images/line.gif" rowSpan=2>
<DIV align=center>
<table class=tableoutline cellspacing=1 cellpadding=4
width="100%" align=center border=0>
<tr class=firstalt>
<td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colspan=2 height=21>
<font class=normalfont><b>所有分类</b></font></td>
</tr>
<tr class=secondalt> <td noWrap width=27%> <font class=normalfont>1:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type1.html" tppabs="http://www.linuxhero.com/docs/type1.html">非技术类</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>2:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type2.html" tppabs="http://www.linuxhero.com/docs/type2.html">基础知识</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>3:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>4:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type4.html" tppabs="http://www.linuxhero.com/docs/type4.html">shell</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>5:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安装启动</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>6:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type6.html" tppabs="http://www.linuxhero.com/docs/type6.html">xwindow</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>7:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type7.html" tppabs="http://www.linuxhero.com/docs/type7.html">kde</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>8:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type8.html" tppabs="http://www.linuxhero.com/docs/type8.html">gnome</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>9:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type9.html" tppabs="http://www.linuxhero.com/docs/type9.html">输入法类</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>10:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type10.html" tppabs="http://www.linuxhero.com/docs/type10.html">美化汉化</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>11:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type11.html" tppabs="http://www.linuxhero.com/docs/type11.html">网络配置</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>12:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type12.html" tppabs="http://www.linuxhero.com/docs/type12.html">存储备份</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>13:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">杂项工具</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>14:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>15:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">网络安全</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>16:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type16.html" tppabs="http://www.linuxhero.com/docs/type16.html">内核技术</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>17:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type17.html" tppabs="http://www.linuxhero.com/docs/type17.html">速度优化</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>18:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type18.html" tppabs="http://www.linuxhero.com/docs/type18.html">apache</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>19:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type19.html" tppabs="http://www.linuxhero.com/docs/type19.html">email</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>20:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type20.html" tppabs="http://www.linuxhero.com/docs/type20.html">ftp服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>21:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type21.html" tppabs="http://www.linuxhero.com/docs/type21.html">cvs服务</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>22:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type22.html" tppabs="http://www.linuxhero.com/docs/type22.html">代理服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>23:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type23.html" tppabs="http://www.linuxhero.com/docs/type23.html">samba</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>24:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type24.html" tppabs="http://www.linuxhero.com/docs/type24.html">域名服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>25:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type25.html" tppabs="http://www.linuxhero.com/docs/type25.html">网络过滤</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>26:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>27:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type27.html" tppabs="http://www.linuxhero.com/docs/type27.html">nfs</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>28:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>29:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type29.html" tppabs="http://www.linuxhero.com/docs/type29.html">dhcp</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>30:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>31:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type31.html" tppabs="http://www.linuxhero.com/docs/type31.html">php</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>32:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type32.html" tppabs="http://www.linuxhero.com/docs/type32.html">ldap</a></font></td> </tr> </table></td></tr> </table>
</DIV></TD></TR>
<TR vAlign=top>
<TD width="80%">
<DIV align=center><BR>
</DIV>
</TD></TR></TBODY></TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE>
<TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#eeeeee
border=0><TBODY>
<TR>
<TD width="50%">
<P><FONT class=middlefont>版权所有 © 2004 <A
href="mailto:bjchenxu@sina.com">linux知识宝库</A><BR>
违者必究. </FONT></P>
</TD>
<TD width="50%">
<DIV align=right><FONT class=middlefont>Powered by: <A
href="mailto:bjchenxu@sina.com">Linux知识宝库</A> Version 0.9.0 </FONT></DIV>
</TD></TR></TBODY></TABLE>
<CENTER></CENTER></TD></TR>
</TABLE></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -