As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
If this question can be reworded to fit the rules in the help center, please edit the question.

10 Answers
10

The best thing you can do to learn this is to find problems and solve them. Go through this site, look at all the "How do I do X in awk/sed/grep/etc." and try them for yourself before looking at the answers. Look if you get stuck or to see how others did it once you find a way. If you find yourself doing something repetitive in the terminal, stop and think about how you might use one or more utilities to make it easier. If you can't find a way to do it, post here and we'll guide you.

Sidenote: seq, head, and tail (at least the most commonly used parts) are fairly trivial. I suggest you start out looking at grep to get comfortable with the searching half of regular expressions and sed (in parallel but lagging a bit behind grep) to get the replacement half (save the more advanced sed commands for later), then awk because it's quite a powerful tool. Then find, then xargs.
–
KevinMar 2 '12 at 16:45

The Art of UNIX Programming by esr is much newer. I found it interesting and helpful, but with a bit more "advocacy" than I felt was necessary. (Euphemism for "frothing partisanship.") Be prepared to take his comparisons to other OSes with a grain of salt, as I recall finding outdated[1] material even when the book was new, and the *ix competitors have almost a decade of progress since that time.

[1] Mostly, I recall jabs at weaknesses in non-*ix OSes that had been eliminated before the book was published. The same sort of thing you find in amateur Windows vs Mac vs Linux arguments all over the net.

Follow the one-a-day plan. Start by listing everything in /sbin. Then take one command per day and type man command and find out what it does. The essential core commands are all in /sbin. After that, go to work on /bin and when that is finished, go to work on /usr/sbin and /usr/bin. You can shorten your list of commands by skipping any with more than 5 letters in the command name, and you will not miss many important things.

But the important thing is that you will learn something new every day, and probably before you are half way through, you will understand so much of the basics, that you can easily pick up half a dozen new commands per day.

But you have to use them, each and every one of them, even if it is only tinkering and doing exercises with them.

This is good idea. Learn commands one by one. Check what they do and master them.
–
KamilMar 2 '12 at 8:17

I can't agree about starting in /sbin, given the "for programmers" in the question title. On many systems, /sbin and /usr/sbin are in the default PATH only for root. I think you may be right to view them as "core" commands in the sense that they're key parts of the OS, but they aren't tools you use in programming so much as system administration.
–
Warren YoungMar 2 '12 at 17:27

The 50 commands is the perfect answer to this question! Go through it, study examples of each command and if it's interesting, follow the link (usually provided) to further examples. That link's a keeper!
–
Bill KMar 2 '12 at 19:04

The infamous "Advanced Bash Scripting" guide will teach you to write bugs, not scripts. Whilst the intentions in writing it were noble, the errata and misinformation is too high to recommend it. mywiki.wooledge.org/BashGuide is a far superior guide.
–
Chris DownMar 2 '12 at 17:14

Thanks @Chris I thought the intro stuff was a good start.
–
ImanMar 2 '12 at 18:57

Programmers have a unique opportunity to master Linux. Every chance you get, instead of writing a program to accomplish a task write a shell script to do it.

I actually have a standing personal challenge to write everything in Bash before I write a program - you'd be amazed and disturbed.

As far as a recommendation for a book, it might seem silly, but the Linux Pocket Guide has a place of honor on my bookshelf. It is compact and has loads of useful Linux programs. Perusing it is easy and its a great reference.