TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Command line tools for the novice

63 点作者 commadelimited将近 13 年前

8 条评论

spudlyo将近 13 年前
I knew before I even clicked on this article, that something inside was going to cause me nerd rage; it's almost always the case when I read these <i>Baby's first UNIX</i> type articles. I thought this one might be different when I saw Andy's formidable neck beard, and for the most part it was decent but then I saw it.<p><i>..plus Ack is 4 or 5 times faster than grep.</i><p>Ack is implemented in Perl, which has a full featured regex engine, but is not generally known for being super fast. It's going up against GNU grep, which is a highly tuned regex engine, which is very fast. The ack guys make the argument that ack is faster because it doesn't search stuff you, the developer, don't care about, which in my estimation is horseshit. Try it yourself, I threw a regex at my email spool from the 90s which is about 128M. I made sure it was in disk cache first and then did:<p><pre><code> chunky:~$ time egrep -c -i '(d|m|j)ingle' RMAIL 23 real 0m3.129s user 0m3.075s sys 0m0.051s chunky:~$ time ack -c -i '(d|m|j)ingle' RMAIL RMAIL:23 real 0m26.208s user 0m26.060s sys 0m0.121s</code></pre>
评论 #4304617 未加载
ralph将近 13 年前
&#62; In Grep grep -R 'some term' * , in Ack ack 'some term'. The -R tells grep to search through all directories and subdirectories while the * tells it what types of files.<p>No, that's not how it works with grep. The shell is expanding the glob * to all the things in the current directory that don't start with a dot and that's what grep sees. It then reads each of them in turn or if they're a directory it descends into them recursively; the * plays no further part in the descent.
评论 #4304271 未加载
jerhinesmith将近 13 年前
I've wanted to try zsh for a long time now, but I worry about the mental context switching I'll have to do when developing locally and then ssh'ing into another server to perform other tasks (servers, I should add, where I can't install zsh).<p>Is anyone in a similar situation? If you switched, was it worth it?
评论 #4303138 未加载
评论 #4303129 未加载
评论 #4303182 未加载
评论 #4303252 未加载
dredmorbius将近 13 年前
Grey text on grey background: <a href="http://contrastrebellion.com/" rel="nofollow">http://contrastrebellion.com/</a>
评论 #4304094 未加载
commadelimited将近 13 年前
I'd love to hear other tools that you guys are using for your daily workflow.
评论 #4303083 未加载
评论 #4302812 未加载
评论 #4305111 未加载
评论 #4303938 未加载
clvv将近 13 年前
Tools similar to z:<p>1. [Autojump](<a href="https://github.com/joelthelion/autojump" rel="nofollow">https://github.com/joelthelion/autojump</a>), first implementation and what z was based on, written in python. Functionality similar to z.<p>2. [Fasd](<a href="https://github.com/clvv/fasd" rel="nofollow">https://github.com/clvv/fasd</a>), feature-rich fork of z, support for files, support for more shells and platforms (BSDs, Android).
jasonlotito将近 13 年前
tmux - Without a doubt, the biggest upgrade to my workflow in years. If you aren't using tmux (or at least screen), you are doing yourself a big disservice.<p>Also, I keep seeing iTerm2 get mention. You mentioned split panes and what not, which are not critical when I have that with tmux (as well as the tabs). And while before Lion, Terminal's color support was weak, that's changed. So, I really wonder what the big reason for using iTerm2 is over Terminal?
评论 #4304515 未加载
cltnoven将近 13 年前
So, first (and most obvious) point of interest. Your function "server" will not work. It contains "python -m SImpleHTTPServer .." .. Notice the typo? It should be SimpleHTTPServer. In addition, that other fluff around it is unneeded in general. Just "python -m SimpleHTTPServer $port" is almost always "good enough", though the SimpleHTTPServer module contains severe bugs. Secondly, your link right above that snipped to Paul Irish contains an href="" which, obviously, links it to your own page. It makes it seem like you're trying to take credit for his work. This is all sloppy and bad form.<p>Honestly, anyone who puts code into a blog post without even bothering to RUN IT THEMSELVES first should get out of the business of writing even slightly technical posts. Feel free to review food without tasting it first instead; at least then it's subjective so you can't be wrong. Here, the "/usr/bin/python: No module named SImpleHTTPServer" you'd get if you had arsed yourself to actually check your code to be valid easily clues the reader into your carelessness.<p>In addition to all that, there's the audacity of posting a post for the "novice" to hacker news when the post is clearly neither relevant for any hacker who has performed any real work or has any real intelligence (they would already know all the mentioned tools) and neither is news for all the tools mentioned are fairly old and well known. You might as well just call us all stupid and dilute the front page further with crap.
评论 #4302965 未加载