Live data from Hacker News

Favorite Unix Commands

clippy.in

131–135 of 135 posts

Re: Favorite Unix Commands

#131

Ctrl+l is my most used command. I need a clean terminal

Cmd + K on the OS X Terminal.

That's gold. I've been using "clear" this whole time and hated it, particularly since I'm used to "cls" from MS-DOS. So, for me, the way to clear the screen was:

cls clear

lol.

I see Cmd + K on the menu now, but I guess I wasn't curious enough to poke around. Thanks a bunch.

Re: Favorite Unix Commands

#132
post #111

Earlier quoted context omitted.

I have a suspicion that it's actually a kind of targeted example-advertisement for the clippy thingo ;) and did somewhat work for me actually, I do now feel interested in learning more about the site

On my mobile device, it was nearly unusable...

Maximized on a 1080p monitor it was irritating with far too many internal scroll bars.

Great list of commands though.

Re: Favorite Unix Commands

#133

Earlier quoted context omitted.

"better" or just faster since its written in C ? It is not a drop-in replacement for ack. e.g. there are some basic usages it does not support -- iirc counts (ag -c pattern).

Eh, faster is faster, does it matter why?

The part about written in C was just added on. My point was "better or faster". If you say "faster is better" I'll have to agree :)

Re: Favorite Unix Commands

#134
post #20

I have this in my .bashrc: function lc() { if [[ "$#" -gt 1 ]]; then for DIR in "$@"; do echo -n "$DIR - " ; ls -AU1 $DIR | wc -l ; done ; else ls -AU1 "$@" | wc -l ; fi; } So, "lc /dir" will count the number of files in /dir and "lc /dir/*" will count the files in subdirectories of /dir. This is useful if you're working in an environment where you may have thousands of files in a directory, and a regular "ls -l" wil…

This might be quicker than firing up a shell script:

> lc /dir" will count the number of files in /dir

  find /dir -type f -maxdepth 1 | wc -l
> and "lc /dir/*" will count the files in subdirectories of /dir.

  find /dir -type f -mindepth 2 | wc -l

Re: Favorite Unix Commands

#135

I have never understood the love for `sudo !!`. I think `ctrl+pa sudo ` is faster, explicit, and more versatile.

My favorite thing about `sudo !!` is that when you IM it to your friend who's learning Unix they'll take that literally rather than realize they should type it into their terminal, leading to a hilarious teachable moment months later when they actually watch you using the command line.
Post reply on HN