Live data from Hacker News

Linux Commands for Developers

blog.jayfields.com

51–60 of 67 posts

Re: Linux Commands for Developers

#53
post #33

I think it's obligatory that someone writes 'strace' in threads about articles like this, so here goes. strace is fantastic for debugging certain categories of problem.

I'm yet to find a decent introduction to strace (or dtrace). I'd appreciate if someone could point me to one...

Re: Linux Commands for Developers

#54
Those are, indeed, 8 commands every developer should know. Calling them "Linux Commands" is a little weird - I don't think there's anything there not specified in POSIX, and I think they all appear on OS X and other unix systems.

Re: Linux Commands for Developers

#56
post #44

Hmmm, is this HN worthy? These commands are so basic that I don't expect any HN-reader using Unix systems not to know those. What about some slightly less basic ones that I'd think would be useful for many people. # less with syntax highlighting alias less="/usr/share/vim/vimcurrent/macros/less.sh" tailf # tail -f, but better & shorter mtr # check your connection (ie., traceroute with more info) htop # nice a colorfu…

> tailf # tail -f, but better & shorter

That's better about tailf, and why would I use it instead of the (far superior to tail) less +F?

Re: Linux Commands for Developers

#57
post #14
post #10

I thought to learn something useful for programing (debugging, program runtime analysis, etc.). But instead the article is just about the generic commands cat, sort, grep, cut, sed, uniq, find and less. It is not really development related.

Totally agree! Wasted time. Everybody know these commands.

You and I do, but surely you know a web dev or two that struggles to read log files meaningfully or doesn't know how to grep their html source for something?

Send the article along, it's not always about you...

Re: Linux Commands for Developers

#58
post #18

how do I execute the out put of something like this: grep -i 'pattern' file | awk '{print $5}' | sed 's/^/cmd/g' I end up sending to a file, chmod, then run it at the shell.

xargs instead of that sed (I assume you're prepending your command to run there).

grep -i 'pattern' file | awk '{print $5}' | xargs cmd

Re: Linux Commands for Developers

#59
post #44

Hmmm, is this HN worthy? These commands are so basic that I don't expect any HN-reader using Unix systems not to know those. What about some slightly less basic ones that I'd think would be useful for many people. # less with syntax highlighting alias less="/usr/share/vim/vimcurrent/macros/less.sh" tailf # tail -f, but better & shorter mtr # check your connection (ie., traceroute with more info) htop # nice a colorfu…

If you are going to use vim, why bit he pretending it is less? Just use vim.

Re: Linux Commands for Developers

#60
post #28
post #23

Earlier quoted context omitted.

Perhaps because sending GiBs through read(2) and write(2) unnecessarily isn't a NOP?

You can do that sending while you're waiting for the disk to provide said GiBs. I also believe that useless uses of cat are often acceptable for readability (many novices are not familiar with redirecting standard input, particularly not as the first thing on a command line).

Who said the GiBs need to be fetched from disk; they could already be in RAM. Even if not, it's still adding many system calls and context switches when the CPU could be doing other things; the machine isn't running just this one thing.
Post reply on HN