Hobby – Family – Technology – More!

Learn 10 Good UNIX usage habits

It’s been a while since i posted something about work.. or hobby.. hehehe.. here’s one.. :)

Adopt 10 good habits that improve your UNIX® command line efficiency — and break away from bad usage patterns in the process. This article takes you step-by-step through several good, but too often neglected, techniques for command-line operations. Learn about common errors and how to overcome them, so you can learn exactly why these UNIX habits are worth picking up.

But of course, di ko sya ilalagay lahat dito.. puntahan nyo nalang un link kung gusto nyo basahin buong article..hehe.. list ko lang ung tips in summary… :

1. Make directory trees in a single swipe
$ mkdir -p tmp/a/b/c or
$ mkdir -p project/{lib/ext,bin,src,doc/{html,info,pdf},demo/stat/a}

This is much faster than making the directories one by one…

2 . Change the path; do not move the archive
$ tar xvf -C tmp/a/b/c newarc.tar.g

This is me.. hehe.. whenever I install a downloaded package, I always move the archive to the location i want it to extract.. We don’t need to do that! That’s what the ‘-C’ take is for…

3. Run a command only if another command returns a non-zero exit status
$ cd tmp/a/b/c || mkdir -p tmp/a/b/c
$ cd tmp/a/b/c || mkdir -p tmp/a/b/c && tar xvf -C tmp/a/b/c ~/archive.tar

First example.. the mkdir only executes if the first command (cd) is successfully executed.. same din pala with the second example.

4. Quote variables with caution
….
dami pala.. you sysad guys just go the link.. hehehe… any check out the christmas decorating tips

7 Responses to “Learn 10 Good UNIX usage habits”

  1. tresebry says:

    wow! mejo malalim to ah. haha

    anyway, tnx for visiting my blog. :D

    lagay kang tagboard para happy! :D

    ganda ng blog mo fafa! :)

  2. irish says:

    aw, syang di ako maka-relate.. gusto ko rin i-try ung ganyang OS e,,kaso walang ako ibang PC para dun ko pag-aralan

  3. Aisha says:

    haha di to kinaya ng powers at kaalaman ko
    pero ty sa pag share hehe

  4. tina says:

    Woo. Unix. :P haha. un lang.

  5. Raquel says:

    Tresebry, was right! Hahaha, wala akong idea nito.

    Your hobby is very interesting Eli.

    Btw, dito ko nalang itanong. Nabasa ko ang message ni Ghee sa tagboard mo. Are you the dad or the mom. At nong sabi ni Trese, “fafa”? C daddy ka ba?

  6. ann says:

    Di ako maka relate…hehehe. Pakilala mo sa amin nanay mo at turuan kong mag blog…hahaha!

  7. Elizar says:

    Sige Ms. Ann, papakunin ko muna sila ng internet connection hehehe..

    Hi Raqs, yup, im the dad.. hehe.. kaya nga elizar nalang gagamitin ko, para sure na dad.. (sure b?) :)

Leave a Reply

Powered by WordPress | Designed by Elegant Themes