Live data from Hacker News

Favorite Unix Commands

clippy.in

61–70 of 135 posts

Re: Favorite Unix Commands

#61
post #60

grep -r . "some random debug message" (searches for the passage recursively in all files from the directory it was executed, the main reason I like developing in linux more than windows)

If you are searching inside code specifically, you may like 'ack'. It does the same thing grep does, except it has preset 'excludes', is recursive by default, and the output is a bit prettier.

Oh thanks! I will give it a whirl

Re: Favorite Unix Commands

#62
It took me a moment to figure out what was going on there (with the whole clippy thing). The bulk of this list is the top commands from commandlinefu which has been on HN before [0], [1].

You can even go meta and install a command to let you search commandlinefu [2].

[0] http://news.ycombinator.com/item?id=527486

[1] http://news.ycombinator.com/item?id=3843373

[2] http://samirahmed.github.com/fu/

Re: Favorite Unix Commands

#64
post #35

Please comment if you have a favorite not on this list.

If you use tmux (or screen) you want to use byobu! https://launchpad.net/byobu https://www.google.de/search?q=byobu+tmux&tbm=isch It's a fancy statusbar that shows CPU speed, IP-address, hostname, ...

I have something similar in my .tmux.conf file

Screenshot: http://i.imgur.com/u6JY0.png

Config file: https://github.com/tylerkahn/dotfiles/blob/master/.tmux.conf...

Works with OSX and Linux.

Re: Favorite Unix Commands

#65

grep -r . "some random debug message" (searches for the passage recursively in all files from the directory it was executed, the main reason I like developing in linux more than windows)

On windows

findstr /SPINC:"some random debug message" *

Will do the same. FINDSTR is no grep, but for very simple cases like this is just fine

SPINC and SPIMC are my favorite options...

Re: Favorite Unix Commands

#69
post #60

grep -r . "some random debug message" (searches for the passage recursively in all files from the directory it was executed, the main reason I like developing in linux more than windows)

If you are searching inside code specifically, you may like 'ack'. It does the same thing grep does, except it has preset 'excludes', is recursive by default, and the output is a bit prettier.

Or even 'ag' (the silver searcher). Like ack, but "better". https://github.com/ggreer/the_silver_searcher

Re: Favorite Unix Commands

#70

Please comment if you have a favorite not on this list.

    export CDPATH=.:~/projects
    export PS1="$(uname -n)$ "
    alias ltr='ls -ltr'
More of a procedure, always list file and edit the command before deleting it:

    $ ll file.txt
    -rw-r--r--  1 zera  staff  0 Jan  7 20:28 file.txt
    Ctrl-p, Ctrl-a, Ctrl-d, Ctrl-d, r,m
    $ rm file.txt
So this is a sanity check to avoid this mistake:

    $ rm *.txt
*Edit, one more:

Ensure you overwrite a file (or aren't):

    $ cp -i ~/file.config /etc/
Post reply on HN