Code Snipcademy on April 1st, 2015.
Many tech-users nowadays do not understanding the power and flexibility that the Linux Command Line presents. Thus, they turn towards graphical user interfaces that not only slow their speed in getting things done, but also limit their ability to handle complex tasks.
In order to realize the power of the Command Line, we'll go over how one can easily cook the perfect medium-rare steak using nothing but a command line interface. Hopefully after seeing how easy it is to do this, people will invest the time to learn the command line and understand why professionals use it almost exclusively in their work.
The first step to cooking a perfect steak is to check the fridge contents to see if we have any steak. We do this simply by changing directories to our Kitchen, and listing the contents of our Fridge.
~$ cd ~/Kitchen/Fridge Fridge$ ls -l
-rwxr--r--@ 1 snipcademy staff 1542 Nov 13 13:12 kimchi drwxr--r--@ 1 snipcademy staff 8715 Nov 28 08:06 Leftover-thanksgiving-food -rwxr--r--@ 1 snipcademy staff 312 Dec 12 15:55 cheese-swiss -rwxr--r--@ 1 snipcademy staff 152 Dec 25 12:32 ketchup -rwxr--r--@ 1 snipcademy staff 973 Feb 05 08:13 plums -rwxr--r--@ 1 snipcademy staff 893 Feb 09 09:06 potoatoes -rwxr--r--@ 1 snipcademy staff 233 Feb 15 15:18 orange-juice -rwxr--r--@ 1 snipcademy staff 6704 Feb 25 09:07 cheese-parmesean -rwxr--r--@ 1 snipcademy staff 1804 Feb 12 11:28 sour-cream -rwxr--r--@ 1 snipcademy staff 123 Mar 03 10:16 raspberry-sauce -rwxr--r--@ 1 snipcademy staff 873 Mar 15 13:06 chicken-broth -rwxr--r--@ 1 snipcademy staff 239 Mar 18 08:17 broccoli -rwxr--r--@ 1 snipcademy staff 220 Mar 19 11:07 tomatoe-sauce -rwxr--r--@ 1 snipcademy staff 143 Mar 23 13:34 milk-2% -rwxr--r--@ 1 snipcademy staff 193 Mar 30 12:11 eggs
Ok, wow. Let's get rid of some expired foods.
Looks like we have kimchi from November. That should be ok. They say that the older the kimchi, the more flavorful it is.
But this swiss cheese has got to go...
Fridge$ rm cheese-swiss
And so does this Leftover Thanksgiving Food...
Fridge$ rm -r Leftover-thanksgiving-food
Welp. Guess we have no steak.
Okay, let's now go to the grocery market. Luckily, I planned ahead and shortcutted the process by setting up an alias to get to my local grocery store.
~$ alias groc='cd /usr/local/Market'
Alright. Let's go to the Market now.
~$ groc Market$ cd Meats
We can filter all the food available by pipelining our results into
Meats$ ls | grep steak filet-mignon-steak flank-steak ribeye-steak prime-rib-steak tri-tip-steak new-york-prime-beef
Cool. Let's just check how much this
new-york-prime-steak costs with the
wc command and its
-c option for cost.
Market$ wc -c new-york-prime-beef 9.12 USD
Not bad. Time to checkout with git.
Market$ git checkout new-york-prime-beef Are you sure you want to purchase new-york-prime-beef for 9.12 USD [Y/n]? Y Enter pin: Transaction complete.
Let's get back home to our home (~) Kitchen to cook this thing!.
$ cd ~/Kitchen
The Command Line has a built-in manual for all commands. That means we don't even have to Google anything to figure out how to perform tasks!
Let's open up the manual page for steak.
Kitchen$ man steak
Okay great! Everything we need is in our manual page. How convenient is that?
Now let's place salt and pepper on our steak, then drizzle some olive oil and sprinkle fresh thyme leaves. Simply pass in the options noted in the man page.
Kitchen$ steak -opst -n 240 new-york-prime-steak ...marinating...
Now we'll just let it sit for about 4 hours (240 min).
Now we're going to take out a large pan and put some olive oil on it at medium-high heat (if you're unfamiliar with how to use a Pan, check out its
Kitchen$ pan -m olive-oil
Then we'll cook the steak on one side for about 4-5 minutes, then the other side for 3-4 minutes.
Kitchen$ mv new-york-prime-steak Pan Kitchen$ cd Pan Pan$ steak -b -n 4 new-york-prime-steak ...cooking...done! Pan$ steak -f new-york-prime-steak Steak flipped. Pan$ steak -b -n 3 new-york-prime-steak ...cooking...done!
Let's now pop it in the oven for about 10 minutes until it reaches medium-rare, or longer if you want your steak to cook more.
Kitchen$ oven --bake 400 ...preheat on...ready! Kitche$ mv new-york-prime-steak ../Oven Kitchen$ oven -t 10 ...baking...done!
Here comes the most important part. We're going to take out a large pan and melt some butter on it, then baste our steak on both sides.
Kitchen$ pan -m butter Kitchen$ mv Oven/new-york-prime-steak Pan/ Kitchen$ cd Pan Pan$ steak -b -n 4 new-york-prime-steak ...basting...done! Pan$ steak -f new-york-prime-steak Steak flipped. Pan$ steak -b -n 3 new-york-prime-steak ...basting...done!
Alas, we can now
push our perfect steak to production. Serve with mashed potatoes, asparagus and a side of salad.
Kitchen$ git add . Kitchen$ git commit -m "Cooked my first steak via the command line" Kitchen$ git push
Wasn't that great? Now if I have you convinced, try checking out our command line tutorial series today to learn how to do more than just cooking a steak!
Stretch out your back and relieve your back muscles with inversion therapy. This device counteracts the forces of gravity on the body by decompressing and elongating the spine. By using this product just ten minutes a day, you can be well on your way to improved circulation and posture while relieving muscle aches, back pain and stress.$$ Check price
The Linux Command Line takes you from your very first terminal keystrokes to writing full programs in Bash, the most popular Linux shell. Along the way you'll learn the timeless skills handed down by generations of gray-bearded, mouse-shunning gurus: file navigation, environment configuration, command chaining, pattern matching with regular expressions, and more.$ Check price