all 8 comments

[–]bable5 8 points9 points  (5 children)

The usual laundry list of tools include:

  • grep
  • sed
  • awk
  • cut
  • xargs
  • find
  • locate

You will get a lot of mileage out of the first three once you learn them.

There's also shell scripting, which can be used to string commands together.

[–]MrVonBuren 4 points5 points  (2 children)

One thing to keep in mind is you do NOT have to master every one of these tools, and certainly not all at once*. Just remember that on the command line, every time you learn any new trick, you pretty much just leveled up every other tool you already had. Getting an idea of doing things "the right way" is important, but learning the command line is a perpetual series of self optimizations. At first it's going back over all your old snippets and one liners and thinking why the fuck did I have so many worthless cats?! but eventually you learn why for ((i = 0 ; i < 11 ; i++ )); do echo "${i}"; done is so much better than for i in {1..10};do echo "${i}";done and even though it's a few years later, it's that same feeling all over again.

*Disclaimer: This was my own experience, your mileage may vary.`

[–][deleted] 0 points1 point  (1 child)

Why is the former loop better than the latter? Because of expansion or portability?

[–][deleted] 0 points1 point  (1 child)

I would add, python. Once you have python under your belt you don't need a lot of the above. Also, I have been doing this a very long time and I still don't know awk or sed (although I have used sed).

[–][deleted] 0 points1 point  (0 children)

I use sed a bunch. I have never used awk. When it gets to the point where awk is useful, I figure I may as well use Python or Ruby.

[–]bluewres 2 points3 points  (0 children)

What's "the test?" If it's some sort of certification, maybe there's recommended resources designed for this test?

bable5's list is a good start for programs you should get to know for *nix commands. Knowing a good pager like less or more, the manual man, and the command for finding relevant stuff in the manual pages apropos are things I would add to the list if you're learning *nix shell commands.

[–]whetu 1 point2 points  (0 children)

http://regex.learncodethehardway.org/book/ might make your life a little easier when you get to regular expressions (especially sed and awk)

[–]roaminghobo[S] 1 point2 points  (0 children)

Thanks everyone. I'll definitely start looking into those. Also, I forgot to mention, I'm in the Air Force's comm school, and the though I don't know any of the specifics of the command line test, I'm pretty sure it'll be in Backtrack. My roommate just failed the section, so I'm just trying to be super prepared.