Here’s a review of the mkdir command and the often overlooked -p option from Easy Linux Commands by Terry Clark and I.

Creating New Directories

The mkdir (make directory) command is used to create a new directory. The directory to be created can be referenced via an absolute path or via a relative path starting with the current working directory.

Make a directory using an absolute path:

$ ls
examples
$ mkdir /home/tclark/new_dir1
$ ls
examples new_dir1

Make a directory using a relative path:

$ mkdir new_dir2
$ ls
examples new_dir1 new_dir2

The –p (parent) option allows creation of a complete directory branch when parent directories do not yet exist. This will actually create both the parent directory and subdirectory specified. In our example that means the new_dir3 and sub_dir3 are both created with a single command.

Make a new directory with a subdirectory using the –p option:

$ mkdir -p new_dir3/sub_dir3
$ ls
examples new_dir1 new_dir2 new_dir3
$ ls new_dir3
sub_dir3

Of course you can also list more than one directory to create with a single mkdir command.

Easy Linux CommandsFor more tips like this check out my book Easy Linux Commands, only $19.95 from Rampant TechPress.

Buy it now!


unix, linux, system administration, sysadmin

Cube at GoogleI can’t believe that in the midst of finishing up at one job, starting another and trying to bang out a couple chapters in my book I almost missed this awesome post from positivesharing.com.

Alexander has compiled a list of 10 seeeeeriously cool workplaces including Pixar, Google, Redbull and many more.

It’s astounding how little attention most employers pay to the environment their employees work in. A good environment will do wonders for morale, retention, creativity, collaboration and countless other facets of your business.

My workspace is still emerging but the great part is I now work from home so I have full control.

office, cubicle, work environment

Don Burleson has recently posted an interesting article on How to become an Oracle Guru.

He stresses that hard work and keeping an eye out for new opportunities are key, and they are. From my experience I would add one more thing to that:

Make a point to fully understand everything you do. Sure, you may know what the oracle listener does and how to start and stop it, but if you don’t understand it you won’t be able to troubleshoot it. You may know when to apply a bitmapped index, but do you know why?

This depth of knowledge is what has set me apart from other IT professionals I’ve worked with. It speeds development and troubleshooting and time after time has made me the go-to guy when people have questions.

How do you get to this technological point of enlightenment? Start at the bottom. I took several computer science classes as an undergraduate. They weren’t at a top university, hell I didn’t even get good grades in most of them, but I was there every day listening to understand. Even just an introductory computer science course, if you’ve never had one, can fill in some background on how searches, queues, logic, hardware and software all work.

After college I worked as a Solaris administrator. That gave me a strong foundation in UNIX and since I displayed a good understanding of UNIX, less than a year after becomming a sys-admin I was slated to become a DBA as one of the companies other DBAs left.

So, now that I’ve rambled on for a bit, what was my point? If you take the time to understand every step, not just slap together a solution, you will generate solutions which are more robust. When you make mistakes you will be in a much better position to learn from them.

My only other peice of advice is resist the urge to cut corners. Do everything you do as well as you possibly can. If you need help, get it. If the project takes longer than expected, fine. Everything you put out there reflects on you as a professional. I like to say “I’d rather not do a job than do a job poorly.”

professional development, oracle, dba, information technology

Easy Linux Commands: Working Examples of Linux Command SyntaxFrom my upcoming book Easy Linux Commands:

Whenever a command or shell script completes successfully, it sets a hidden status code of zero. If the command is unsuccessful, it sets a nonzero hidden status code. This completion status code is known as the exit status. The exit status of the last command or script that was run is contained in the special shell variable, $?.

Most of the time we never look at this value and instead check to see if the command did what we want or look for errors in the output of commands. In a shell script, however, we may want to check the exit status to make sure everything is going OK. The exit status of the last command can be displayed as follows:

$ ls
example1.fil example2.xxx examples test.bsh umask_example.fil
$ echo $?
0
$ ls *.txt
ls: *.txt: No such file or directory
$ echo $?
1

The value of the exit code can then be used in a conditional statement or be transferred to another variable.

Easy Linux CommandsFor more tips like this check out my book Easy Linux Commands, only $19.95 from Rampant TechPress.

Buy it now!


linux, unix, linux command, exit status

Via Carla, here are three very good UserFriendly comics which aptly reflect my feelings on coffee:

UserFriendly is often good for a laugh. Hopefully they don’t mind me posting these cartoons here, their copyright notice is very explicit (and rather humerous!):

All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don’t do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you’re really bad, we’ll call your mom. (We’re not kidding, we’ve done it before.)

comic, geek humor, office humor

« Previous PageNext Page »