Basic Commands: Symbolic Links

Symbolic links allow an administrator to point a link (file or directory) to another real location.

 

How do I create a symbolic link?

# ln –s [target file/directory] /link/location/to/file/or/directory

 

For example, you wish to link /etc/httpd/conf to point to the real location of /usr/local/apache/conf

The command would look like this:
# ln –s /usr/local/apache/conf /etc/httpd/conf

 

Assure that the destination for your link (in our example this would be /usr/local/apache/conf) does not already exist.

How to Calculate IOPS (I/O’s per Second)

 

IOPS (I/O’s per Second,
or iostat "tps")

Data Transfer Rate
(MB/sec)

Minimum Number of Disk Drives to Support Workload

Random I/O (10k RPM)

125

0.5

n = (%R + f (%W))(tps)/125

Random I/O (15k RPM)

150

0.5+

n = (%R + f (%W))(tps)/150

Sequential I/O

2000

50

n = (MB/sec)/50

Where:
%R = the percentage of disk I/O’s that are reads.
%W= the percentage of disk I/O’s that are writes.
f = 1 for ordinary disks, 2 for mirrored disks, 4 for Raid 5 disks.
Assumes data is distributed evenly across all disk drives.

 

Using the above formula, here’s the minimum number of disks required to support a random I/O workload, at 1000 IOPS,  80% read, 20% write on 10K RPM disk drives.

 

Ordinary disks:  (0.8 + 1*0.2)(1000 IOPS)/(125 IOPS/disk)  = 8
Mirrored disks:  (0.8 + 2*0.2)(1000 IOPS)/(125 IOPS/disk)  = 10
Raid 5 disks:      (0.8 + 4*0.2)(1000 IOPS)/(125 IOPS/disk) =  13

Full Article Here

How to Start/Stop Dell OMSA on Windows

From Dell’s Support Site:

 

To start Server Administrator, perform the following steps:

  1. Click the Start button and point to Settings® Control Panel® Administrative Tools® Services.
    The Services window appears.
  2. Right-click the Secure Port Server icon.
  3. Click Start.

 

To stop Server Administrator, perform the following steps:

  1. Click the Start button and point to Settings® Control Panel® Administrative Tools® Services.              The Services window appears.
  2. Right-click the Secure Port Server icon.
  3. Click Stop.

Linux CLI (Command Line Interface) Tricks

Here is a small(ish) list of Linux CLI tips and tricks I have learned and researched over the years. This list is by no means completely comprehensive but contains a list of some of the tricks I use on an everyday basis. Living your life “in the shell” can be very cumbersome if you aren’t using the tricks outlined below. Good luck and happy Linuxing.

 

I will say this: Do not give in and use all the tricks all the time if you are just starting with Linux. It’s always best (in my opinion) to learn the ropes and background to everything before using the GUI or any related tricks. I believe this is true with almost any learning process – technology-based or not.

Command Line File Name Completion

Tired of typing the whole path to a single command? Some commands can be very large and cumbersome. Try “tabbing it out”.

Try for example: where<tab>

The above should return whereis. If you have more than one binary in your path that contains the word where you may not get a result. In this case hit tab again and you’ll be presented with all options.

 

Print Working Directory (pwd)

imageThe pwd command is useful to tell you what directory you are currently in. Depending on your shell configuration, you will be presented with your full working directory in the title of your shell program. For instance, I use putty and it always shows my Current Working Directory (CWD).

 
Command History

Forget what the last few commands you completed were? Want to diagnose a system and you have no idea what the person before you executed? Try the “history” command in Linux.

Type “history”. This provides a list of all recently entered commands and can be very large. If you type “history 10” it works much like the tail command and shows the last 10 commands in history.

Type “history –c” to clear your command history.

 

Output Redirection

Tons of information from the command you just executed? Redirect the output to a file or another program.

> – Output Redirection >> – Append to EOF (end of file)  
1> – Redirect STDOUT (Standard Out) < – Input Redirection  
2> – Redirect STDERR (Standard Error)    
&> – Redirect all    

 

Examples:

# echo “foo” > bar (this example will echo the text “foo” to the file called “bar”)

# echo “foo2” >> bar (this example will echo the text “foo2” to the end of the file “bar”)

# wc –l < bar (this example will do a line count on the file bar)

Typically commands read, by default from STDIN. For instance I could also run wc like this:

# wc -l bar

I would still obtain the same results as explicitly telling the CLI to use STDIN (<).

 

Aliases

Using aliases is another way to make entering common commands easier. Think of an alias as a simple shortcut to a longer command. Let’s say you want to remove a directory and you’re tired of always typing “rm –rf <directory”. You can make an alias by typing “alias rmdir=’rm –rf’. Now you can type “rmdir <directory>” on the CLI and achieve the same result.

 

Symbolic Links

A symbolic link is simply a pointer to another file/directory. To make a shortcut to a program shorter or as a link inside your home directory use a command like this:

# ln –s /usr/local/program/bin/program ~/program

– or to link an entire directory –

# ln –s /usr/local/program ~/program

Symbolic links appear when performing an ls –lt like this:
image

 

apropos Search Whatis Database

Ever wanted to find a command but never knew the name? Do you know what the command does or a description but can’t put your finger on it? Use the command apropos to search the whatis database.

Just type apropos “string to search for”

image

 

Whereis – Find a binary or man page

Ever needed to find the location of a binary easily? Try “whereis”. Simply type whereis “binary” and you will be presented with a location to the binary and/or manpage for the given binary.

image

 

There are a ton of other shortcuts I am missing but this is just a small list. Have a great day!

Acronis True Image Home (Run List Corrupted)

I started to receive a message on my new Vista box in Acronis True Image Home that looks like this:

 

Information    12/15/2008 8:07:49 AM    Locking partition C:…
Error    12/15/2008 8:10:00 AM    Operation with partition "2-0" was terminated.
Details:
Run list corrupted (0x7001C)
    Tag = 0x89D94B01B483E221

 

To rectify this issue just run a "CHKDSK C: /R" which should clean up a few NTFS attributes. This usually will happen if you hard-cycle your system for some reason.