<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ORATraining Blog</title>
	<atom:link href="http://www.oratraining.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.oratraining.com/blog</link>
	<description>Not just another Oracle Blog</description>
	<lastBuildDate>Mon, 14 Dec 2009 10:55:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fix for IE crash on launching forms in Oracle Applications 11i (11.5.10)</title>
		<link>http://www.oratraining.com/blog/2009/12/fix-for-ie-crash-on-launching-forms-in-oracle-applications-11i-11-5-10/</link>
		<comments>http://www.oratraining.com/blog/2009/12/fix-for-ie-crash-on-launching-forms-in-oracle-applications-11i-11-5-10/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 08:03:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle Applications]]></category>
		<category><![CDATA[Oracle Applications DBA]]></category>
		<category><![CDATA[Oracle Applications issues]]></category>
		<category><![CDATA[7]]></category>
		<category><![CDATA[crash]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[jvm.dll]]></category>
		<category><![CDATA[launch]]></category>
		<category><![CDATA[oracle applications]]></category>

		<guid isPermaLink="false">http://www.oratraining.com/blog/?p=203</guid>
		<description><![CDATA[Many of you would have noticed that while launching forms from Oracle Applications 11.5.10 using Internet Explorer (IE 7) then it might crash with following error. Though it may work perfectly fine in mozilla firefox.


This is the working fix for the issue.
Solution-1:
1) Take backup of jvm.dll located at c:\Program Files\Oracle\JInitiator 1.3.1.21\bin\hotspot directory.
2) Copy jvm.dll from [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; line-height: 19px; padding: 0px;">Many of you would have noticed that while launching forms from Oracle Applications 11.5.10 using Internet Explorer (IE 7) then it might crash with following error. Though it may work perfectly fine in mozilla firefox.</p>
<p><img class="alignnone size-full wp-image-208" title="ie-crash1" src="http://www.oratraining.com/blog/wp-content/uploads/2009/12/ie-crash1.JPG" alt="ie-crash1" width="334" height="224" /></p>
<p style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; line-height: 19px; padding: 0px;"><img class="alignnone size-full wp-image-209" title="jvm-error1" src="http://www.oratraining.com/blog/wp-content/uploads/2009/12/jvm-error1.JPG" alt="jvm-error1" width="422" height="273" /></p>
<p style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; line-height: 19px; padding: 0px;">This is the working fix for the issue.</p>
<p style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; line-height: 19px; padding: 0px;"><strong>Solution-1:</strong></p>
<p style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; line-height: 19px; padding: 0px;">1) Take backup of jvm.dll located at <strong>c:\Program Files\Oracle\JInitiator 1.3.1.21\bin\hotspot</strong> directory.<br />
2) Copy <strong>jvm.dll</strong> from <strong>C:\Program Files\Java\jre1.6.0_07\bin\client</strong> (or whichever highest version of jre you have) to <strong>c:\Program Files\Oracle\JInitiator 1.3.1.21\bin\hotspot</strong><br />
3) Clear browser cache and also Oracle Jar cache (Remove all files from<strong> c:\documents and settings\&lt;username&gt;\Oralce Jar cache</strong>)<br />
4)	Close all the browsers and restart</p>
<p style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; line-height: 19px; padding: 0px;">Enjoy !! The issue should have been resolved now !</p>
<p style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; line-height: 19px; padding: 0px;"><strong>Solution-2:</strong></p>
<p style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; line-height: 19px; padding: 0px;">In case if you are unable to find the jvm.dll in that location or if the above solution didn&#8217;t work for you, you can download the working jvm.dll from <a href="http://blog.oratraining.com/files/jvm.dll" target="_blank">this link</a>.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.oratraining.com%2Fblog%2F2009%2F12%2Ffix-for-ie-crash-on-launching-forms-in-oracle-applications-11i-11-5-10%2F&amp;linkname=Fix%20for%20IE%20crash%20on%20launching%20forms%20in%20Oracle%20Applications%2011i%20%2811.5.10%29"><img src="http://www.oratraining.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.oratraining.com/blog/2009/12/fix-for-ie-crash-on-launching-forms-in-oracle-applications-11i-11-5-10/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>vi commands quick reference</title>
		<link>http://www.oratraining.com/blog/2009/06/vi-commands-quick-reference/</link>
		<comments>http://www.oratraining.com/blog/2009/06/vi-commands-quick-reference/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 06:23:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux/Unix/Solaris]]></category>
		<category><![CDATA[Shell scripting]]></category>
		<category><![CDATA[Unix administration]]></category>

		<guid isPermaLink="false">http://www.oratraining.com/blog/?p=199</guid>
		<description><![CDATA[Unix vi commands quick reference
General Notes:
1. Before practicing using this vi tutorial, type the following command followed by a   carriage return: :set showmode
2. vi is not VI. It is case sensitive!!! So make sure Caps Lock is OFF.
Requirements:
In order to work correctly the vi need correct terminal type (TERM) setting. The TERM setting depends on [...]]]></description>
			<content:encoded><![CDATA[<h2>Unix vi commands quick reference</h2>
<p><strong>General Notes:</strong><br />
1. Before practicing using this vi tutorial, type the following command followed by a   carriage return: :set showmode<br />
2. vi is not VI. It is case sensitive!!! So make sure Caps Lock is OFF.<a name="start"></a></p>
<p><strong>Requirements:</strong></p>
<p>In order to work correctly the vi need correct terminal type (TERM) setting. The TERM setting depends on the type of terminal you have. Commonly used TERM types are vt100, vt220 and ANSI.  In most cases vt100 will work fine. In case vi is not able to understand the TERM you have given, it starts in open mode giving you a line by line display. Generally TERM is taken from .profile or /etc/profile, but can be set at the command line as:</p>
<p>$TERM=vt100</p>
<p>$export TERM</p>
<p>echo $TERM will display the current TERM set.</p>
<p><span id="more-199"></span></p>
<p><strong>Starting and Ending VI</strong></p>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td colspan="2"><strong>Starting VI</strong></td>
</tr>
<tr>
<td>vi <em>filename</em></td>
<td>Edits <em>filename </em>starting at line1</td>
</tr>
<tr>
<td>vi -r <em>filename</em></td>
<td>Recover<em> </em><tt><em>filename</em></tt> that was being edited when system crashed</td>
</tr>
<tr>
<td>vi + n <em>filename</em></td>
<td>Edits <em>filename</em> and places cursor at line n</td>
</tr>
<tr>
<td>vi + <em>filename</em></td>
<td>Edits <em>filename</em> and places cursor on last line</td>
</tr>
<tr>
<td>vi +/<em>string</em> <em>filename</em></td>
<td>Edits <em>filename</em> and places cursor on first occurrence of <em>string</em></td>
</tr>
<tr>
<td>vi <em>filename</em> <em>file2</em> &#8230;</td>
<td>Edits <em>filename</em>, then edits <em>file2</em> &#8230; After the save, use :n</td>
</tr>
<tr>
<td colspan="2"><strong>Ending VI</strong></td>
</tr>
<tr>
<td>ZZ or :wq or : x</td>
<td>Saves and exits VI</td>
</tr>
<tr>
<td>:w</td>
<td>Saves current <em>file</em> but doesn&#8217;t exit</td>
</tr>
<tr>
<td>:w!</td>
<td>Saves current file overriding normal checks but doesn&#8217;t exit</td>
</tr>
<tr>
<td>:w <em>file</em></td>
<td>Saves current as <em>file</em> but doesn&#8217;t exit</td>
</tr>
<tr>
<td>:w! <em>file</em></td>
<td>Saves to <em>file</em> overriding normal checks but doesn&#8217;t exit</td>
</tr>
<tr>
<td>:n,mw <em>file</em></td>
<td>Saves lines n through m to <em>file</em></td>
</tr>
<tr>
<td>:n,mw &gt;&gt;<em>file</em></td>
<td>Saves lines n through m to the end of <em>file</em></td>
</tr>
<tr>
<td>:q</td>
<td>Quits VI and may prompt if you need to save</td>
</tr>
<tr>
<td>:q!</td>
<td>Quits VI and without saving</td>
</tr>
<tr>
<td>:e!</td>
<td>Edits file discarding any unsaved changes (revert to previous saved version)</td>
</tr>
<tr>
<td>:e <em>file</em></td>
<td>Edits file (current file becomes alternate file)</td>
</tr>
<tr>
<td>:e#</td>
<td>Edit alternate file</td>
</tr>
<tr>
<td>:we!</td>
<td>Saves and continues to edit current file</td>
</tr>
<tr>
<td>%</td>
<td>Display current filename</td>
</tr>
<tr>
<td>#</td>
<td>Display alternate filename</td>
</tr>
<tr>
<td><a name="status"></a>:n</td>
<td>Edit next file</td>
</tr>
<tr>
<td>:n!</td>
<td>Edit next file (ignoring warnings)</td>
</tr>
<tr>
<td>:n <em>files</em></td>
<td>Specify new list of <em>files</em></td>
</tr>
<tr>
<td>:r <em>file</em></td>
<td>Insert(read) <em>file </em>after cursor</td>
</tr>
<tr>
<td>:r !<em>command</em></td>
<td>Run <em>command, </em>and insert output after current line</td>
</tr>
</tbody>
</table>
<p><strong> </strong></p>
<p><strong>Determining Line Numbers</strong></p>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td>:.=</td>
<td>Returns line number of current line at bottom of screen</td>
</tr>
<tr>
<td>:=</td>
<td>Returns the total number of lines at bottom of screen</td>
</tr>
<tr>
<td>^g</td>
<td>Provides the current line number, along with the total number of lines,<br />
in the file at the bottom of the screen</td>
</tr>
</tbody>
</table>
<p><a name="mode"></a><strong>Modes</strong></p>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td>Vi has two modes: 1) Insertion mode and 2) command mode.The editor begins in command mode, where the cursor movement and text deletion and pasting occur.</p>
<p>Insertion mode begins upon entering an insertion or change command. [ESC] returns the editor to command mode (where you can quit, for example by typing: q!).</p>
<p>Most commands execute as soon as you type them except for &#8220;colon&#8221; commands which execute when you press the return key.</td>
</tr>
</tbody>
</table>
<p><a name="insert"></a><strong>Inserting, appending and replacing Text</strong></p>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td colspan="2">Inserting and appending text</td>
</tr>
<tr>
<td>I</td>
<td>Inserts text at the beginning of the current line</td>
</tr>
<tr>
<td>i</td>
<td>Inserts text at the cursor</td>
</tr>
<tr>
<td>A</td>
<td>Appends text at the end of current line</td>
</tr>
<tr>
<td>a</td>
<td>Appends text after the cursor</td>
</tr>
<tr>
<td colspan="2">Adding new line</td>
</tr>
<tr>
<td>O</td>
<td>Open a new line above the current line</td>
</tr>
<tr>
<td>o</td>
<td>Open a new line below the current line</td>
</tr>
<tr>
<td colspan="2">Replacing a character &amp; word</td>
</tr>
<tr>
<td>R</td>
<td>Replace characters, starting with current cursor position, until <tt>&lt;Esc&gt;</tt> hit</td>
</tr>
<tr>
<td>r</td>
<td>Replace single character under cursor (no <tt>&lt;Esc&gt;</tt> needed)</td>
</tr>
<tr>
<td>cw</td>
<td>Replaces the word from cursor to the end indicated by $ sign</td>
</tr>
<tr>
<td>C</td>
<td>Replaces till end of line</td>
</tr>
<tr>
<td>:r <em>file</em></td>
<td>Reads <em>file</em> and inserts it after current line</td>
</tr>
<tr>
<td>:nr <em>file</em></td>
<td>Reads <em>file</em> and inserts it after line n</td>
</tr>
</tbody>
</table>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td colspan="2">Things to do while in Insert Mode:</td>
</tr>
<tr>
<td>CTRL-h or Backspace</td>
<td>While inserting, deletes previous character</td>
</tr>
<tr>
<td>CTRL-w</td>
<td>While inserting, deletes previous word</td>
</tr>
<tr>
<td>CTRL-x</td>
<td>While inserting, deletes to start of inserted text</td>
</tr>
<tr>
<td>CTRL-i or TAB</td>
<td>While inserting, inserts one shift width(tab)</td>
</tr>
<tr>
<td>CTRL-v <em>char</em></td>
<td>While inserting, ignores special meaning of <em>char</em> (e.g., for inserting characters like ESC and CTRL) until ESC is used</td>
</tr>
<tr>
<td>CTRL-v</td>
<td>Take the next character literally. (i.e. To insert a Control-H, type Control-v Control-h)</td>
</tr>
</tbody>
</table>
<p><a name="motion"></a><strong>Motion</strong></p>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td>h <em>or</em> &lt;backspace&gt;<em>or</em> [left-arrow]</td>
<td>Moves the cursor to the left</td>
</tr>
<tr>
<td>j <em>or</em> &lt;Return&gt; <em>or</em> [down-arrow]</td>
<td>Moves down the cursor</td>
</tr>
<tr>
<td>k <em>or</em> [up-arrow]</td>
<td>Moves up the cursor</td>
</tr>
<tr>
<td>l <em>or</em> &lt;Space&gt; <em>or</em> [right-arrow]</td>
<td>Moves the cursor to the right</td>
</tr>
<tr>
<td>Arrow Keys</td>
<td>These do work, but they may be too slow on big files. Also may have unpredictable results when arrow keys are not mapped correctly in client.</td>
</tr>
<tr>
<td>w</td>
<td>Moves cursor to the beginning of the next word</td>
</tr>
<tr>
<td>W</td>
<td>Moves the cursor to next blank delimited word</td>
</tr>
<tr>
<td>b</td>
<td>Moves the cursor back to beginning of the preceding word</td>
</tr>
<tr>
<td>B</td>
<td>Moves the cursor to the beginning of blank delimited word</td>
</tr>
<tr>
<td>^</td>
<td>Moves the cursor to the first non-blank character in the current line</td>
</tr>
<tr>
<td>+ or Enter</td>
<td>Moves the cursor to the beginning of the next line</td>
</tr>
<tr>
<td>-</td>
<td>Moves the cursor to the first non-blank character of the previous line</td>
</tr>
<tr>
<td>e</td>
<td>Moves  cursor to the end of the current word</td>
</tr>
<tr>
<td>E</td>
<td>Moves cursor to the end of Blank delimited word</td>
</tr>
<tr>
<td>(</td>
<td>Moves cursor a sentence back</td>
</tr>
<tr>
<td>)</td>
<td>Moves cursor a sentence forward</td>
</tr>
<tr>
<td>{</td>
<td>Moves cursor a paragraph back</td>
</tr>
<tr>
<td>}</td>
<td>Moves cursor a paragraph forward</td>
</tr>
<tr>
<td>[[</td>
<td>Moves cursor a section back</td>
</tr>
<tr>
<td>]]</td>
<td>Moves cursor a section forward</td>
</tr>
<tr>
<td>0 or |</td>
<td>Moves cursor to the start of the current line</td>
</tr>
<tr>
<td>N|</td>
<td>Moves cursor to the column n in the current line</td>
</tr>
<tr>
<td>$</td>
<td>Moves cursor to the end of the current line</td>
</tr>
<tr>
<td>1G <em>or</em> :0&lt;Return&gt;</td>
<td>Moves cursor to the start of the first line in the file</td>
</tr>
<tr>
<td>G <em>or </em>:$&lt;Return&gt;</td>
<td>Moves cursor to the start of the last line in the file</td>
</tr>
<tr>
<td>nG <em>or </em>:n&lt;Return&gt;</td>
<td>Moves cursor to the start of the nth line in the file</td>
</tr>
<tr>
<td>F</td>
<td>Moves cursor forward to c</td>
</tr>
<tr>
<td>Fc</td>
<td>Moves cursor back to c</td>
</tr>
<tr>
<td>H</td>
<td>Moves cursor to the first line on the screen, or &#8220;home&#8221;</td>
</tr>
<tr>
<td>nH</td>
<td>Moves cursor to nth line from the top of the screen</td>
</tr>
<tr>
<td>M</td>
<td>Move cursor to the middle line on the screen</td>
</tr>
<tr>
<td>L</td>
<td>Move cursor to the last line on the screen</td>
</tr>
<tr>
<td>nL</td>
<td>Moves cursor to nth line from the bottom of the screen</td>
</tr>
<tr>
<td>CTRL-d</td>
<td>Moves down ½ screen</td>
</tr>
<tr>
<td>CTRL-f</td>
<td>Moves forward one full screen</td>
</tr>
<tr>
<td>CTRL-u</td>
<td>Moves up ½ screen</td>
</tr>
<tr>
<td>CTRL-b</td>
<td>Moves backward one full screen</td>
</tr>
<tr>
<td>CTRL-e</td>
<td>Moves screen up one line</td>
</tr>
<tr>
<td>CTRL-y</td>
<td>Moves screen down one line</td>
</tr>
<tr>
<td>CTRL-l</td>
<td>Clears and redraws the current screen</td>
</tr>
<tr>
<td>CTRL-r</td>
<td>Redraws the screen, removing deleted lines</td>
</tr>
<tr>
<td>CTRL-T</td>
<td>Moves cursor to next tab position</td>
</tr>
<tr>
<td>CTRL-W</td>
<td>Moves back one word</td>
</tr>
<tr>
<td>Z</td>
<td>z-carriage return makes the current line the top line on the page</td>
</tr>
<tr>
<td>Nz</td>
<td>Makes the line n the top line on the page</td>
</tr>
<tr>
<td>z.</td>
<td>Makes the current line the middle line on the page</td>
</tr>
<tr>
<td>Nz.</td>
<td>Makes the line n the middle line on the page</td>
</tr>
<tr>
<td>z-</td>
<td>Makes the current line the bottom line on the page</td>
</tr>
<tr>
<td>Nz-</td>
<td>Makes the line n the bottom line on the page</td>
</tr>
<tr>
<td>%</td>
<td>Move to associated ( ), { }, [ ]</td>
</tr>
</tbody>
</table>
<p><a name="delete"></a><strong>Deleting Text</strong></p>
<table border="0" cellpadding="0">
<tbody>
<tr>
<td>Almost all deletion commands are performed by typing d followed by a motion. For example, dw deletes a word. A few other deletes are:</td>
</tr>
</tbody>
</table>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td>x</td>
<td>Delete character to the right of cursor</td>
</tr>
<tr>
<td>nx</td>
<td>Deletes n characters starting with current; omitting n deletes current character only</td>
</tr>
<tr>
<td>X</td>
<td>Delete character to the left of cursor</td>
</tr>
<tr>
<td>nX</td>
<td>Deletes previous n characters; omitting n deletes previous character only</td>
</tr>
<tr>
<td>D</td>
<td>Delete to the end of the line</td>
</tr>
<tr>
<td>D$</td>
<td>Deletes from the cursor to the end of the line</td>
</tr>
<tr>
<td>dd or :d or CTRL-U</td>
<td>Delete current line</td>
</tr>
<tr>
<td>ndw</td>
<td>Deletes the next n words starting with current</td>
</tr>
<tr>
<td>ndb</td>
<td>Deletes the previous n words starting with current</td>
</tr>
<tr>
<td>ndd</td>
<td>Deletes n lines beginning with the current line</td>
</tr>
<tr>
<td>:n,md</td>
<td>Deletes lines n through m</td>
</tr>
<tr>
<td>d<em>Motion_cmd</em></td>
<td>Deletes everything included in the Motion Command (e.g., dG would delete from current position to the end of the file, and d4 would delete to the end of the fourth sentence).</td>
</tr>
<tr>
<td>&#8220;np</td>
<td>Retrieves the last nth delete (last 9 deletes are kept in a buffer)</td>
</tr>
<tr>
<td>&#8220;1pu.u.</td>
<td>Scrolls through the delete buffer until the desired delete is retrieved (repeat u.)</td>
</tr>
</tbody>
</table>
<p><a name="yank"></a><strong>Yanking Text</strong></p>
<table border="0" cellpadding="0">
<tbody>
<tr>
<td>Like deletion, almost all yank commands are performed by typing y followed by a motion. For example, y$ yanks to the end of the line. Two other yank commands are:</td>
</tr>
</tbody>
</table>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td>yy</td>
<td>Yank the current line</td>
</tr>
<tr>
<td>:y</td>
<td>Yank the current line</td>
</tr>
<tr>
<td>nyy or nY</td>
<td>Places n lines in the buffer-copies</td>
</tr>
<tr>
<td>y<em>Motion_cmd</em></td>
<td>Copies everything from the curser to the Motion Command (e.g., yG would copy from current position to the end of the file, and y4 would copy to the end of the fourth sentence)</td>
</tr>
<tr>
<td>&#8220;(a-z)nyy or &#8220;(a-z)ndd</td>
<td>Copies or cuts (deletes) n lines into a named buffer a through z; omitting n works on current line</td>
</tr>
</tbody>
</table>
<p><a name="change"></a><strong>Changing text</strong></p>
<table border="0" cellpadding="0">
<tbody>
<tr>
<td>The change command is a deletion command that leaves the editor in insert mode. It is performed by typing c followed by a motion. For example cw changes a word. A few other change commands are:</td>
</tr>
</tbody>
</table>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td>C</td>
<td>Change to the end of the line</td>
</tr>
<tr>
<td>cc or S</td>
<td>Change the whole line until ESC is pressed</td>
</tr>
<tr>
<td>xp</td>
<td>Switches character at cursor with following character</td>
</tr>
<tr>
<td>s<em>text</em></td>
<td>Substitutes text for the current character until ESC is used</td>
</tr>
<tr>
<td>cw<em>text</em></td>
<td>Changes current word to text until ESC is used</td>
</tr>
<tr>
<td>C<em>text</em></td>
<td>Changes rest of the current line to text until ESC is used</td>
</tr>
<tr>
<td>c<em>Motion_cmd</em></td>
<td>Changes to text from current position to Motion Command until ESC is used</td>
</tr>
<tr>
<td>&lt;&lt; or &gt;&gt;</td>
<td>Shifts the line left or right (respectively) by one shift width (a tab)</td>
</tr>
<tr>
<td>N&lt;&lt; or n&gt;&gt;</td>
<td>Shifts n lines left or right (respectively) by one shift width (a tab)</td>
</tr>
<tr>
<td>&lt;<em>Motion_cmd</em> or &gt;<em>Motion_cmd</em></td>
<td>Use with Motion Command to shift multiple lines left or right</td>
</tr>
</tbody>
</table>
<p><a name="put"></a><strong>Putting text</strong></p>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td>p</td>
<td>Put after the position or after the line</td>
</tr>
<tr>
<td>P</td>
<td>Put before the position or before the line</td>
</tr>
<tr>
<td>&#8220;(a-z)p or &#8220;(a-z)P</td>
<td>Pastes text from a named buffer a through z after or before the current line</td>
</tr>
</tbody>
</table>
<p><a name="buffer"></a><strong><br />
Buffers</strong></p>
<table border="0" cellpadding="0">
<tbody>
<tr>
<td>Named buffers may be specified before any deletion, change, yank or put command. The general prefix has the form &#8220;c where c is any lowercase character. For example, &#8220;adw deletes a word into buffer a. It may thereafter be put back into text with an appropriate &#8220;ap.</td>
</tr>
</tbody>
</table>
<p><a name="mark"></a><strong>Markers</strong></p>
<table border="0" cellpadding="0">
<tbody>
<tr>
<td>Named markers may be set on any line in a file. Any lower case letter may be a marker name. Markers may also be used as limits for ranges.</td>
</tr>
</tbody>
</table>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td>mc</td>
<td>Set marker c on this line</td>
</tr>
<tr>
<td>&#8216;c</td>
<td>Go to beginning of marker c line.</td>
</tr>
<tr>
<td>&#8216;c</td>
<td>Go to first non-blank character of marker c line.</td>
</tr>
</tbody>
</table>
<p><a name="search"></a><strong>Search for strings</strong></p>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td>/<em>string</em></td>
<td>Search forward for <em>string</em></td>
</tr>
<tr>
<td>?<em>string</em></td>
<td>Search back for <em>string</em></td>
</tr>
<tr>
<td>n</td>
<td>Search for next instance of <em>string</em></td>
</tr>
<tr>
<td>N</td>
<td>Search for previous instance of <em>string</em></td>
</tr>
<tr>
<td>%</td>
<td>Searches to beginning of balancing ( ) [ ] or { }</td>
</tr>
<tr>
<td>f<em>c</em></td>
<td>Searches forward in current line to <em>char</em></td>
</tr>
<tr>
<td>F<em>c</em></td>
<td>Searches backward in current line to <em>char</em></td>
</tr>
<tr>
<td>t<em>c</em></td>
<td>Searches forward in current line to character before char</td>
</tr>
<tr>
<td>Tchar</td>
<td>Searches backward in current line to character before char</td>
</tr>
<tr>
<td>?str</td>
<td>Finds in reverse for str</td>
</tr>
<tr>
<td>:set ic</td>
<td>Ignores case when searching</td>
</tr>
<tr>
<td>:set noic</td>
<td>Pays attention to case when searching</td>
</tr>
<tr>
<td>:n,ms/<em>str1</em>/<em>str2</em>/<em>opt</em></td>
<td>Searches from n to m for <em>str1</em>; replaces <em>str1</em> to <em>str2</em>; using opt-opt can be g for global change, c to confirm change (y to acknowledge, to suppress), and p to print changed lines</td>
</tr>
<tr>
<td>&amp;</td>
<td>Repeats last :s command</td>
</tr>
<tr>
<td>:g/<em>str</em>/<em>cmd</em></td>
<td>Runs <em>cmd</em> on all lines that contain <em>str</em></td>
</tr>
<tr>
<td>:g/<em>str1</em>/s/<em>str2</em>/<em>str3</em>/</td>
<td>Finds the line containing <em>str1</em>, replaces <em>str2</em> with <em>str3</em></td>
</tr>
<tr>
<td>:v/<em>str</em>/<em>cmd</em></td>
<td>Executes <em>cmd</em> on all lines that do not match <em>str</em></td>
</tr>
<tr>
<td>,</td>
<td>Repeats, in reverse direction, last / or ? search command</td>
</tr>
</tbody>
</table>
<p><a name="replace"></a><strong>Replace</strong></p>
<table border="0" cellpadding="0">
<tbody>
<tr>
<td>The search and replace function is accomplished with the :s command. It is commonly used in combination with ranges or the :g command (below).</td>
</tr>
</tbody>
</table>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td>:s/<em>pattern</em>/<em>string</em>/<em>flags</em></td>
<td>Replace <em>pattern</em> with <em>string</em> according to <em>flags</em>.</td>
</tr>
<tr>
<td>G</td>
<td>Flag &#8211; Replace all occurrences of pattern</td>
</tr>
<tr>
<td>C</td>
<td>Flag &#8211; Confirm replaces.</td>
</tr>
<tr>
<td>&amp;</td>
<td>Repeat last :s command</td>
</tr>
</tbody>
</table>
<p><a name="re"></a><strong>Regular Expressions</strong></p>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td>. (dot)</td>
<td>Any single character except newline</td>
</tr>
<tr>
<td>*</td>
<td>zero or more occurrences of any character</td>
</tr>
<tr>
<td>[...]</td>
<td>Any single character specified in the set</td>
</tr>
<tr>
<td>[^...]</td>
<td>Any single character not specified in the set</td>
</tr>
<tr>
<td>\&lt;</td>
<td>Matches beginning of word</td>
</tr>
<tr>
<td>\&gt;</td>
<td>Matches end of word</td>
</tr>
<tr>
<td>^</td>
<td>Anchor &#8211; beginning of the line</td>
</tr>
<tr>
<td>$</td>
<td>Anchor &#8211; end of line</td>
</tr>
<tr>
<td>\&lt;</td>
<td>Anchor &#8211; beginning of word</td>
</tr>
<tr>
<td>\&gt;</td>
<td>Anchor &#8211; end of word</td>
</tr>
<tr>
<td>\(&#8230;\)</td>
<td>Grouping &#8211; usually used to group conditions</td>
</tr>
<tr>
<td>\n</td>
<td>Contents of nth grouping</td>
</tr>
<tr>
<td>\</td>
<td>Escapes the meaning of the next character (e.g., \$ allows you to search for $)</td>
</tr>
<tr>
<td>\\</td>
<td>Escapes the \ character</td>
</tr>
</tbody>
</table>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td colspan="2">[...] &#8211; Set Examples</td>
</tr>
<tr>
<td>[A-Z]</td>
<td>The SET from Capital A to Capital Z</td>
</tr>
<tr>
<td>[a-z]</td>
<td>The SET from lowercase a to lowercase z</td>
</tr>
<tr>
<td>[0-9]</td>
<td>The SET from 0 to 9 (All numerals)</td>
</tr>
<tr>
<td>[./=+]</td>
<td>The SET containing. (dot), / (slash), =, and +</td>
</tr>
<tr>
<td>[-A-F]</td>
<td>The SET from Capital A to Capital F and the dash (dashes must be specified first)</td>
</tr>
<tr>
<td>[0-9 A-Z]</td>
<td>The SET containing all capital letters and digits and a space</td>
</tr>
<tr>
<td>[A-Z][a-zA-Z]</td>
<td>In the first position, the SET from Capital A to Capital Z<br />
In the second character position, the SET containing all letters</td>
</tr>
<tr>
<td>[a-z]{m}</td>
<td>Look for <em>m</em> occurrences of the SET from lowercase a to lowercase z</td>
</tr>
<tr>
<td>[a-z]{m,n}</td>
<td>Look for at least m occurrences, but no more than n occurrences of the SET from lowercase a to lowercase z</td>
</tr>
</tbody>
</table>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td colspan="2">Regular Expression Examples</td>
</tr>
<tr>
<td>/Hello/</td>
<td>Matches if the line contains the value Hello</td>
</tr>
<tr>
<td>/^TEST$/</td>
<td>Matches if the line contains TEST by itself</td>
</tr>
<tr>
<td>/^[a-zA-Z]/</td>
<td>Matches if the line starts with any letter</td>
</tr>
<tr>
<td>/^[a-z].*/</td>
<td>Matches if the first character of the line is a-z and there is at least one more of any character following it</td>
</tr>
<tr>
<td>/2134$/</td>
<td>Matches if line ends with 2134</td>
</tr>
<tr>
<td>/\(21|35\)/</td>
<td>Matches is the line contains 21 or 35<br />
Note the use of ( ) with the pipe symbol to specify the &#8216;or&#8217; condition</td>
</tr>
<tr>
<td>/[0-9]*/</td>
<td>Matches if there are zero or more numbers in the line</td>
</tr>
<tr>
<td>/^[^#]/</td>
<td>Matches if the first character is not a # in the line</td>
</tr>
<tr>
<td colspan="2">Notes:<br />
1. Regular expressions are case sensitive<br />
2. Regular expressions are to be used where <em>pattern</em> is specified</td>
</tr>
</tbody>
</table>
<p><a name="count"></a><strong>Counts</strong></p>
<table border="0" cellpadding="0">
<tbody>
<tr>
<td>Nearly every command may be preceded by a number that specifies how many times it is to be performed. For example, 5dw will delete 5 words and 3fe will move the cursor forward to the 3rd occurrence of the letter e. Even insertions may be repeated conveniently with this method, say to insert the same line 100 times.</td>
</tr>
</tbody>
</table>
<p><a name="range"></a><strong>Ranges</strong></p>
<table border="0" cellpadding="0">
<tbody>
<tr>
<td>Ranges may precede most &#8220;colon&#8221; commands and cause them to be executed on a line or lines. For example :3,7d would delete lines 3-7. Ranges are commonly combined with the :s command to perform a replacement on several lines, as with :.,$s/pattern/string/g to make a replacement from the current line to the end of the file.</td>
</tr>
</tbody>
</table>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td>:n,m</td>
<td>Range &#8211; Lines n-m</td>
</tr>
<tr>
<td>:.</td>
<td>Range &#8211; Current line</td>
</tr>
<tr>
<td>:$</td>
<td>Range &#8211; Last line</td>
</tr>
<tr>
<td>:&#8217;c</td>
<td>Range &#8211; Marker c</td>
</tr>
<tr>
<td>:%</td>
<td>Range &#8211; All lines in file</td>
</tr>
<tr>
<td>:g/<em>pattern</em>/</td>
<td>Range &#8211; All lines that contain <em>pattern</em></td>
</tr>
</tbody>
</table>
<p><strong>Shell Functions</strong></p>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td>:! Cmd</td>
<td>Executes shell command cmd; you can add these special characters to indicate:% name of current file# name of last file edited</td>
</tr>
<tr>
<td>!! cmd</td>
<td>Executes shell command cmd, places output in file starting at current line</td>
</tr>
<tr>
<td>:!!</td>
<td>Executes last shell command</td>
</tr>
<tr>
<td>:r! cmd</td>
<td>Reads and inserts output from cmd</td>
</tr>
<tr>
<td>:f</td>
<td>Displays the name of the current file</td>
</tr>
<tr>
<td>:f file</td>
<td>Renames current file to file</td>
</tr>
<tr>
<td>:w !cmd</td>
<td>Sends currently edited file to cmd as standard input and execute cmd</td>
</tr>
<tr>
<td>:cd dir</td>
<td>Changes current working directory to dir</td>
</tr>
<tr>
<td>:sh</td>
<td>Starts a sub-shell (CTRL-d returns to editor)</td>
</tr>
<tr>
<td>:so file</td>
<td>Reads and executes commands in file (file is a shell script)</td>
</tr>
<tr>
<td>!<em>Motion_cmd</em></td>
<td>Sends text from current position to Motion Command <em>cmd</em></td>
</tr>
<tr>
<td>!}sort</td>
<td>Sorts from current position to end of paragraph and replaces text with sorted text</td>
</tr>
</tbody>
</table>
<p><a name="file"></a><strong>Files</strong></p>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td>:w <em>file</em></td>
<td>Write to <em>file</em></td>
</tr>
<tr>
<td>:r <em>file</em></td>
<td>Read <em>file</em> in after line</td>
</tr>
<tr>
<td>:n</td>
<td>Go to next file</td>
</tr>
<tr>
<td>:p</td>
<td>Go to previous file</td>
</tr>
<tr>
<td>:e <em>file</em></td>
<td>Edit <em>file</em></td>
</tr>
<tr>
<td>!!<em>program</em></td>
<td>Replace line with output from <em>program</em></td>
</tr>
</tbody>
</table>
<p><a name="settings"></a><strong>VI Settings</strong></p>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td colspan="2">Note: Options given are default. To change them, enter type :set option to turn them on or :set no<em>optioni</em> to turn them off. To make them execute every time you open VI, create a file in your HOME directory called .exrc and type the options without the colon (:) preceding the option</td>
</tr>
<tr>
<td>:set ai</td>
<td>Turns on auto indentation</td>
</tr>
<tr>
<td>:set all</td>
<td>Prints all options to the screen</td>
</tr>
<tr>
<td>:set ap</td>
<td>Prints line after d c J m :s t u commands</td>
</tr>
<tr>
<td>:set bf</td>
<td>Discards control characters from input</td>
</tr>
<tr>
<td>:set dir=<em>tmp</em></td>
<td>Sets <em>tmp</em> to directory or buffer file</td>
</tr>
<tr>
<td>:set eb</td>
<td>Precedes error messages with a bell</td>
</tr>
<tr>
<td>:set ic</td>
<td>Ignores case when searching</td>
</tr>
<tr>
<td>:set lisp</td>
<td>Modifies brackets for Lisp compatibility.</td>
</tr>
<tr>
<td>:set list</td>
<td>Shows tabs (^l) and end of line ($)</td>
</tr>
<tr>
<td>:set magic</td>
<td>Allows pattern matching with special characters</td>
</tr>
<tr>
<td>:set mesg</td>
<td>Allows others to send messages</td>
</tr>
<tr>
<td>:set no<em>option</em></td>
<td>Turns off <em>option</em></td>
</tr>
<tr>
<td>:set nu</td>
<td>Shows line numbers</td>
</tr>
<tr>
<td>:set opt</td>
<td>Speeds output; eliminates automatic RETURN</td>
</tr>
<tr>
<td>:set prompt</td>
<td>Prompts for command input with :</td>
</tr>
<tr>
<td>:set re</td>
<td>Simulates smart terminal on dumb terminal</td>
</tr>
<tr>
<td>:set report</td>
<td>Indicates largest size of changes reported on status line</td>
</tr>
<tr>
<td>:set ro</td>
<td>Changes file type to &#8220;read only&#8221;</td>
</tr>
<tr>
<td>:set scroll=n</td>
<td>set n lines for CTRL-d and z</td>
</tr>
<tr>
<td>:set sh=<em>shell_path</em></td>
<td>set shell escape (default is /bin/sh) to <em>shell_path</em></td>
</tr>
<tr>
<td>:set showmode</td>
<td>Indicates input or replace mode at bottom</td>
</tr>
<tr>
<td>:set sw=n</td>
<td>Sets shift width to n characters</td>
</tr>
<tr>
<td>:set term</td>
<td>Prints terminal type</td>
</tr>
<tr>
<td>:set terse</td>
<td>Shorten messages with terse</td>
</tr>
<tr>
<td>:set timeout</td>
<td>Eliminates one-second time limit for macros</td>
</tr>
<tr>
<td>:set tl=n</td>
<td>Sets significance of tags beyond n characters (0 means all)</td>
</tr>
<tr>
<td>:set ts=n</td>
<td>Sets tab stops to n for text input</td>
</tr>
<tr>
<td>:set wa</td>
<td>Inhibits normal checks before write commands</td>
</tr>
<tr>
<td>:set warn</td>
<td>Warns &#8220;no write since last change&#8221;</td>
</tr>
<tr>
<td>:set window=n</td>
<td>Sets number of lines in a text window to n</td>
</tr>
<tr>
<td>:set wm=n</td>
<td>Sets automatic wraparound n spaces from right margin.</td>
</tr>
</tbody>
</table>
<p><a name="mapping"></a><strong>Key Mapping</strong></p>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td colspan="2">NOTE: Map allows you to define strings of VI commands. If you create a file called &#8220;.exrc&#8221; in your home directory, any map or set command you place inside this file will be executed every time you run VI. To imbed control characters like ESC in the macro, you need to precede them with CTRL-v. If you need to include quotes (&#8220;), precede them with a \ (backslash). Unused keys in vi are: K V g q v * = and the function keys.<br />
Example (The actual VI commands are in blue):map v /I CTRL-v ESC dwiYou CTRL-v ESC ESC<br />
Description: When v is pressed, search for &#8220;I&#8221; (/I ESC), delete word (dw), and insert &#8220;You&#8221; (iYou ESC). CTRL-v allows ESC to be inserted</td>
</tr>
<tr>
<td>:map <em>key</em> <em>cmd_seq</em></td>
<td>Defines <em>key</em> to run <em>cmd_seq</em> when pressed</td>
</tr>
<tr>
<td>:map</td>
<td>Displays all created macros on status line</td>
</tr>
<tr>
<td>:unmap key</td>
<td>Removes macro definition for key</td>
</tr>
<tr>
<td>:ab <em>str</em> <em>string</em></td>
<td>When <em>str</em> is input, replaces it with <em>string</em></td>
</tr>
<tr>
<td>:ab</td>
<td>Displays all abbreviations</td>
</tr>
<tr>
<td>:una <em>str</em></td>
<td>Unabbreviate <em>str</em></td>
</tr>
</tbody>
</table>
<p><a name="other"></a><strong>Other</strong></p>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td>~</td>
<td>Toggle upper and lower case for the character at the current position</td>
</tr>
<tr>
<td>J</td>
<td>Joins the line immediately below the current line with the current line</td>
</tr>
<tr>
<td>nJ</td>
<td>Joins the next n lines together; omitting n joins the beginning of the next line to the end of the current line</td>
</tr>
<tr>
<td>.</td>
<td>Repeat last text-changing command</td>
</tr>
<tr>
<td>U</td>
<td>Undo the effect of last command (Note: u in combination with . can allow multiple levels of undo in some versions)</td>
</tr>
<tr>
<td>U</td>
<td>Undo all changes to the current line</td>
</tr>
<tr>
<td>;</td>
<td>Repeats last f F t or T search command</td>
</tr>
</tbody>
</table>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.oratraining.com%2Fblog%2F2009%2F06%2Fvi-commands-quick-reference%2F&amp;linkname=vi%20commands%20quick%20reference"><img src="http://www.oratraining.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.oratraining.com/blog/2009/06/vi-commands-quick-reference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unix/Linux commands Quick reference</title>
		<link>http://www.oratraining.com/blog/2009/06/unix-commands-quick-reference-2/</link>
		<comments>http://www.oratraining.com/blog/2009/06/unix-commands-quick-reference-2/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 06:13:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux/Unix/Solaris]]></category>
		<category><![CDATA[Shell scripting]]></category>
		<category><![CDATA[Unix administration]]></category>

		<guid isPermaLink="false">http://www.oratraining.com/blog/?p=196</guid>
		<description><![CDATA[Quick Reference: Unix Commands and options
The following format is used for commands:
Italic indicates a variable that you supply
Bold indicates exactly what you type
[ ] Square brackets indicate that the thing which they surround is optionally typed. The square brackets themselves are not to be typed.
To display a command description from the Unix Manual and can be [...]]]></description>
			<content:encoded><![CDATA[<h2>Quick Reference: Unix Commands and options</h2>
<p>The following format is used for commands:<br />
<em>Italic </em>indicates a variable that you supply<br />
<strong>Bold </strong>indicates exactly what you type<br />
[ ] Square brackets indicate that the thing which they surround is optionally typed. The square brackets themselves are not to be typed.</p>
<p>To display a command description from the Unix Manual and can be used to get more information on each command. Type following on shell prompt to see the manual:<br />
<strong>man </strong><em>command</em><br />
Example: <strong>man ls </strong>to find more about the command ls<em> </em></p>
<p>If you are not sure of the exact command name, you can use <code>man</code> with the <code> -k </code> option to help you find the command you need. To see one line summaries of each reference page that contains the keyword you specify, enter: <strong>man -k</strong> <em>keyword</em> <span id="more-196"></span></p>
<table border="1" cellpadding="0" width="106%">
<tbody>
<tr>
<td><strong>Command</strong></td>
<td>
<p align="center"><strong>Action</strong></p>
</td>
<td>
<p align="center"><strong>Example</strong></p>
</td>
</tr>
<tr>
<td valign="top"><a name="A"></a><strong> </strong></td>
<td valign="top">Creates a temporary name (alias) for a Unix command. When you type <em>alias-name</em>, <em>string</em> is substituted and run in its place. Typically, you put alias commands in your .cshrc file. Aliases can be self-referential without causing infinite recursion, e.g.:<br />
<em>alias rm &#8217;rm -i&#8217;</em><em> </em></td>
<td valign="top"><strong>alias </strong><strong><em>alias_</em></strong><em>name string </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong> </strong></td>
<td valign="top">To remove an alias</td>
<td valign="top"><strong>unalias </strong><em>name </em></td>
</tr>
<tr>
<td valign="top"><strong>ansiprint </strong><strong> </strong></td>
<td valign="top">Prints a file to a printer connected to your computer.</td>
<td valign="top"><strong>ansiprint </strong><em>file </em></td>
</tr>
<tr>
<td valign="top"><tt>apropos</tt><strong> </strong></td>
<td valign="top">Find a list of manual pages about a keyword.</td>
<td valign="top"><tt><strong>apropos</strong></tt><tt> <em>keyword</em></tt> <strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>Ar</strong></td>
<td valign="top">Create and maintain library archives</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top">archie<strong> </strong></td>
<td valign="top">search the Archie database for a file on a FTP site</td>
<td valign="top"><strong>archie </strong><em>file</em><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>asa</strong></td>
<td valign="top">Text Processing: Interpret carriage-control characters</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>assets </strong><strong> </strong></td>
<td valign="top">Displays your account resources, use, and threshold.</td>
<td valign="top"><strong> </strong> <em> </em></td>
</tr>
<tr>
<td valign="top"><strong>At</strong></td>
<td valign="top">Process Management: Execute commands at a later time</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>awk</strong></td>
<td valign="top">Text Processing: Pattern scanning and processing language. <tt>awk</tt> is most commonly used to extract numbered fields from lines of text. For example, the following command prints the third word on each line: <tt>awk</tt> also supports more complicated scripting &#8211; see the manual page.</td>
<td valign="top"><tt><strong>awk</strong></tt><tt> '{print $5}' <em>[file]</em></tt></p>
<p><strong> </strong></td>
</tr>
<tr>
<td valign="top">basename</td>
<td valign="top">File system: Return non-directory portion of a pathname</td>
<td valign="top"><strong> </strong> <em> </em></td>
</tr>
<tr>
<td valign="top">batch<strong> </strong></td>
<td valign="top">Process Management: Schedule commands to be executed in a batch queue</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>Bc</strong></td>
<td valign="top">A simple calculator; Arbitrary-precision arithmetic language. Uses integer arithmetic by default. For floating-point arithmetic, type &#8220;bc -l&#8221;.</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><a name="B"></a><strong> </strong></td>
<td valign="top">Process Management: Places or runs job in the background.</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top">break<strong> </strong></td>
<td valign="top">Shell programming: Exit from for, while, or until loop</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>cal</strong></td>
<td valign="top">Display a calendar of the current month.</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong> </strong></td>
<td valign="top">Display a calendar of the given month and year. Note that the year must be fully qualified, for example, &#8220;2003&#8243; and not &#8220;03.&#8221;</td>
<td valign="top"><strong>cal </strong><strong><em>month year</em></strong> <strong> </strong></td>
</tr>
<tr>
<td valign="top"><a name="C"></a><strong> </strong></td>
<td valign="top">File system: Concatenate and displays specified files</td>
<td valign="top"><strong>cat </strong> <em>file </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong></td>
<td valign="top">Overwrites the <em>file2</em> with the content of <em>file1</em></td>
<td valign="top"><strong>cat </strong><strong><em>file1&gt;file2</em></strong><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong> </strong></td>
<td valign="top">Append <em>file1</em> to the end of <em>file2</em></td>
<td valign="top"><strong>cat </strong><strong><em>file1&gt;&gt;file2</em></strong><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong> </strong></td>
<td valign="top">Creates a file, typing some text, and finishing by pressing ctrl-d at the start of a line.</td>
<td valign="top"><strong>cat  &gt; </strong><strong><em>file1</em></strong><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>Cc</strong></td>
<td valign="top">Compile a C program</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>Cd </strong><strong> </strong></td>
<td valign="top">File system: Changes current directory to a different directory.</td>
<td valign="top"><strong>cd </strong> <em>directory </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong> </strong></td>
<td valign="top">To change back to your home directory:</td>
<td valign="top"><strong>cd </strong> <em> </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong> </strong></td>
<td valign="top">Directory abbreviations:</p>
<p><strong>~</strong> Home directory</p>
<p><strong>..</strong> Parent directory</p>
<p><strong>.</strong> Current working directory</td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top">cflow<strong> </strong></td>
<td valign="top">C Programming : Generate a C-language flowgraph</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top">chfn</td>
<td valign="top">change your &#8220;Real Name&#8221; as seen on finger</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top">chgrp<strong></strong></td>
<td valign="top">File system: Change the file group ownership. Makes file belong to the group user. NOTE: You must be the owner of the file/directory or be root</td>
<td valign="top"><strong>chgrp </strong><em>user file</em> <strong></strong></td>
</tr>
<tr>
<td valign="top"><strong>chmod </strong><strong></strong></td>
<td valign="top">File system: Change the file modes/attributes/permissions NOTE: You must be the owner of the file/directory or be root</td>
<td valign="top"><strong>chmod </strong> <em>code file </em><br />
<strong>chmod </strong> <em>code directory </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To keep a file private</td>
<td valign="top"><strong>chmod </strong> <em>600 file </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To give everyone read permission:</td>
<td valign="top"><strong>chmod </strong> <em>664 file </em></td>
</tr>
<tr>
<td valign="top">chown<strong></strong></td>
<td valign="top">File system: Change the file ownership NOTE: You must be the owner of the file/directory or be root</td>
<td valign="top"><strong>chown</strong> <em>new_own file</em> <strong></strong></td>
</tr>
<tr>
<td valign="top"></td>
<td valign="top">Makes cliff(<em>new_own)</em> the owner of dir and everything in its directory tree. NOTE: You must be the owner of the file/directory or be root</td>
<td valign="top"><strong>chown</strong> <strong>-R</strong> <em>cliff dir</em> <strong></strong></td>
</tr>
<tr>
<td valign="top">chsh</td>
<td valign="top">change the shell you log into</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top">cksum<strong></strong></td>
<td valign="top">File system: Write file checksums and sizes</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>clear</strong><strong> </strong><strong></strong></td>
<td valign="top">Clears terminal screen</td>
<td valign="top"><strong>clear</strong></td>
</tr>
<tr>
<td valign="top">cmp<strong></strong></td>
<td valign="top">File system: Compare two files</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>comm</td>
<td>Text Processing: Select or reject lines common to two files</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>command</td>
<td>Shell programming: Execute a simple command</td>
<td valign="top"><strong>command </strong></td>
</tr>
<tr>
<td valign="top"><strong> </strong></td>
<td valign="top">Shell programming: Executes <em>command1</em> in background</td>
<td valign="top"><strong>Command1&amp;</strong></td>
</tr>
<tr>
<td valign="top"><strong>compress </strong><strong></strong></td>
<td valign="top">File system: Reduces the size of a file and adds .Z to the file&#8217;s name.</td>
<td valign="top"><strong>compress </strong> <em>file </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To restore a compressed file:</td>
<td valign="top"><strong>uncompress </strong> <em>file.Z </em></td>
</tr>
<tr>
<td valign="top">continue<strong></strong></td>
<td valign="top">Shell programming: Continue for, while, or until loop</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>Cp </strong><strong></strong></td>
<td valign="top">File system: Makes a copy of a file.</td>
<td valign="top"><strong>cp </strong> <em>file1 file2 </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To copy a file into a different directory:</td>
<td valign="top"><strong>cp </strong> <em>file directory </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To inquire before overwriting an existing file:</td>
<td valign="top"><strong>cp -i </strong> <em>file1 file2 </em></td>
</tr>
<tr>
<td valign="top"></td>
<td valign="top">To copy a directory and, recursively, its subdirectories</td>
<td valign="top"><strong>cp -r </strong><strong><em>dir1 dir2</em></strong> <strong></strong></td>
</tr>
<tr>
<td valign="top"></td>
<td valign="top">To retain timestamp while copying</td>
<td valign="top"><strong>cp -p </strong><strong></strong></td>
</tr>
<tr>
<td valign="top">crontab<strong></strong></td>
<td valign="top">Schedule periodic background work</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top">csplit<strong></strong></td>
<td valign="top">Text Processing: Split files based on context</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top">ctags<strong></strong></td>
<td valign="top">C Programming: Create a tags file</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top">cut<strong></strong></td>
<td valign="top">Shell programming: Cut out selected fields of each line of a file</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top">cxref<strong></strong></td>
<td valign="top">C Programming: Generate a C-language program cross-reference table</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>date</td>
<td>Display the current local date and time.</td>
<td valign="top"><strong>date</strong></td>
</tr>
<tr>
<td>Dd</td>
<td>File system: Convert and copy a file</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>delta</td>
<td>Make a delta (change) to an SCCS file</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>Df</td>
<td>File system: Report free disk space available on the system</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong> </strong></td>
<td valign="top">print list of disks and current capacity (in kilobytes)</td>
<td valign="top"><strong>df -k<strong></strong></strong></td>
</tr>
<tr>
<td valign="top"><a name="D"></a><strong></strong></td>
<td valign="top">Text Processing: Compares two files and displays the differences. Here, shows differences between <em>file1</em> and <em>file2</em></td>
<td valign="top"><strong>diff </strong><em>file1 file2</em></td>
</tr>
<tr>
<td>dirname</td>
<td>File system: Return the directory portion of a pathname</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>dos2unix</td>
<td>strips CR&#8217;s out of dos text files</td>
<td valign="top"><strong>dos2unix</strong> <em>&lt;file&gt; &lt;new_file&gt;</em><strong></strong></td>
</tr>
<tr>
<td>dot</td>
<td>Shell programming: Execute commands in the current environment</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>Du</td>
<td>File system: Estimate file space usage</td>
<td valign="top"><strong>du</strong></td>
</tr>
<tr>
<td></td>
<td>Print size (in kilobytes) of current directory (&#8220;.&#8221;). Variations:<br />
<strong>du -sk *</strong> prints sizes (in kilobytes) of all files and sub-directories<br />
<strong>du -sk <em>file </em></strong>prints size (in kilobytes) of <em>file</em></p>
<p><strong>du -sk <em>dir </em></strong>prints sum of size (in kilobytes) of <em>dir</em> and its contents</td>
<td valign="top"><strong>du -sk </strong><strong></strong></td>
</tr>
<tr>
<td>dvips</td>
<td>Print <strong>.dvi</strong> files (i.e. files produced by LaTeX). You can use <strong>dviselect</strong> to print only selected pages.</td>
<td valign="top"><strong>dvips </strong><em>filename</em><strong></strong></td>
</tr>
<tr>
<td>echo</td>
<td>Shell programming: Displays a line of text or</p>
<p>Write arguments to standard output. Note that the shell will expand variables in the line, e.g. &#8220; <tt>echo $user</tt> &#8221; will print the contents of the variable <tt>user</tt>. Use single quotes (e.g. &#8220; <tt>echo '$user'</tt> &#8220;) if you want to prevent this.</td>
<td valign="top"><strong>echo </strong><strong><em>text</em></strong><strong><em></em></strong></td>
</tr>
<tr>
<td></td>
<td>Example: This command find out what shell you are using by the command</td>
<td valign="top"><strong>echo</strong> $SHELL<strong></strong></td>
</tr>
<tr>
<td>Ed</td>
<td>Text Processing: The standard text editor</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>elm</td>
<td>Another email program</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>emacs</td>
<td>Text editor: Edit a file using the emacs editor. Not all systems will have emacs. It&#8217;s Extremely versatile. In emacs, press <tt>ctrl-h</tt>, <tt>t</tt> for a tutorial.</td>
<td valign="top"><strong>emacs</strong> <em>filename</em> <strong></strong></td>
</tr>
<tr>
<td>env</td>
<td>Set the environment for command invocation</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>eval</td>
<td>Shell programming: Construct command by concatenating arguments</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>Ex</td>
<td>Text Processing: Text editor</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>exec</td>
<td>Shell programming: Execute commands and open, close, or copy file descriptors</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top">exit<strong></strong></td>
<td valign="top">Shell programming: Exits from the current shell. Similar to logout, but can also be used in shell scripts.</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>expand</td>
<td>Text Processing: Convert tabs to spaces</td>
<td valign="top"><strong> </strong> <em> </em></td>
</tr>
<tr>
<td>export</td>
<td>Set the export attribute for variables</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>expr</td>
<td>Shell programming: Evaluate arguments as an expression. Give it expressions on the command line. Make sure to put spaces around the numbers, e.g.<br />
expr &#8217;2 + 2&#8242;</td>
<td valign="top"><strong>expr</strong> &#8216;<em>expression</em>&#8216;</p>
<p><strong> </strong></td>
</tr>
<tr>
<td>false</td>
<td>Shell programming: Return false value</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>Fc</td>
<td>Process the command history list</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>Ff</strong></td>
<td valign="top">Find files anywhere on the system. This can be extremely useful if you&#8217;ve forgotten in which directory you put a file, but do remember the name. In fact, if you use <strong>ff -p</strong> you don&#8217;t even need the full name, just the beginning. This can also be useful for finding other things on the system, e.g. documentation.</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><a name="F"></a><strong></strong></td>
<td valign="top">Process Management: Restarts a suspended job in the foreground.</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>File</td>
<td>File system: Determine file type</td>
<td valign="top"><strong>file </strong><strong><em>files</em></strong><strong> </strong><strong></strong></td>
</tr>
<tr>
<td>find</td>
<td>File system: Find the loation of <em>file.1</em> in the directory and sub-directories. Variations:<br />
<strong>find . -name &#8220;*<em>pattern</em>&#8221; -print</strong> finds all files that end with <em>pattern</em>.<br />
<strong>find . -name <em>file.1</em> -exec rm &#8216;{}&#8217; &#8216;;&#8217;</strong> removes all files named <em>file.1</em>.</td>
<td valign="top"><strong>find . -name </strong><em>file.1 </em> <strong>-print<strong></strong></strong></td>
</tr>
<tr>
<td valign="top"><strong>finger </strong><strong></strong></td>
<td valign="top">Displays user information at the specified computer.</td>
<td valign="top"><strong>finger </strong> <em>userid@computer </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To change your finger entry information:</td>
<td valign="top"><strong>chfn </strong></td>
</tr>
<tr>
<td valign="top">fold<strong></strong></td>
<td valign="top">Text Processing: Filter for folding lines</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>fort77</strong></td>
<td valign="top">C Programming: FORTRAN compiler</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>ftp </strong><strong></strong></td>
<td valign="top">Starts the file transfer program with a remote computer insecurely. This method does not use encryption, so there is a risk of your password and other data being spied on. It should be avoided wherever scp is available.</td>
<td valign="top"><strong>ftp </strong><em>host_address </em></td>
</tr>
<tr>
<td valign="top">fuser<strong></strong></td>
<td valign="top">Process Management: List process IDs of all processes that have one or more files open</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top">gcc</td>
<td valign="top">Compiles C source into a file named &#8216;a.out&#8217;. It compiles a C program with the GNU C-compiler</td>
<td valign="top"><strong>gcc </strong> <em>file.c</em></td>
</tr>
<tr>
<td valign="top">gencat</td>
<td valign="top">Generate a formatted message catalog</td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top">genscript</td>
<td valign="top">Converts plain text files into postscript for printing, and gives you some options for formatting. Consider making an alias like <strong>alias ecop &#8216;genscript -2 -r \!* | lpr -h -Pvalkyr&#8217;</strong> to print two pages on one piece of paper.</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top">getconf<strong></strong></td>
<td valign="top">Get configuration values</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top">getopts<strong></strong></td>
<td valign="top">Shell programming: Parse utility options</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top">gopher<strong></strong></td>
<td valign="top">A Gopher database browser</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><a name="G"></a><strong></strong></td>
<td valign="top">Finds lines in a file matching a character pattern. grep comes in several varieties (<strong>grep</strong>, <strong>egrep</strong>, and <strong>fgrep</strong>) and has a lot of very flexible options. Check out the man pages if this sounds good to you.</td>
<td valign="top"><strong>grep -icvn </strong> <em>pattern file </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top"><strong>-i</strong> Ignores case</p>
<p><strong>-c</strong> Lists count of lines that contain pattern</p>
<p><strong>-v</strong> Lists all lines except those with pattern</p>
<p><strong>-n</strong> Lists line number for each found pattern</td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top">gzip<strong></strong></td>
<td valign="top">Compress the specified files. This turns <tt>filename</tt> into <tt>filename.gz</tt>, which is smaller.<br />
Text files compress very well, but with binary data files you might not save much disk space</td>
<td valign="top"><tt><strong>gzip</strong></tt><tt> <em>file...</em></tt></p>
<p><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong> </strong></td>
<td valign="top">Uncompress the specified files.The opposite of the <tt>gzip</tt> command.</td>
<td valign="top"><tt><strong>gunzip</strong></tt><tt> <em>file...</em></tt> <strong></strong></td>
</tr>
<tr>
<td valign="top"><strong> </strong></td>
<td valign="top">To  look at a gzipped file without actually having to gunzip it (same as <strong>gunzip -c</strong>). You can even print it directly, using <strong>gzcat <em>filename</em> | lpr</strong></td>
<td valign="top"><strong>gzcat </strong><em>filename</em><strong></strong></td>
</tr>
<tr>
<td valign="top"><strong>hash</strong></td>
<td valign="top">Remember or report utility locations</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><a name="H"></a><strong></strong></td>
<td valign="top">Text Processing: Displays the first ten lines of a file.</td>
<td valign="top"><strong>head </strong> <em>file </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To display the first <em>n</em> number of lines</td>
<td valign="top"><strong>head -n </strong> <em>file </em></td>
</tr>
<tr>
<td valign="top"><strong>help </strong><strong></strong></td>
<td valign="top">Displays an online help note.</td>
<td valign="top"><strong>help </strong> <em>note </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To display a list of help notes:</td>
<td valign="top"><strong>help -l </strong></td>
</tr>
<tr>
<td valign="top"><strong>history </strong><strong></strong></td>
<td valign="top">Displays a list of your most recent commands.</td>
<td valign="top"><strong>history </strong></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To repeat the nth command from the list. (for example, type &#8220;!m&#8221; to repeat the last command that began with &#8220;m&#8221;)</td>
<td valign="top"><strong>! </strong> <em>n </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To repeat your most recent command</td>
<td valign="top"><strong>!! </strong></td>
</tr>
<tr>
<td>hostname</td>
<td>Show the name of the machine</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>iconv</td>
<td>Text Processing: Codeset conversion</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>Id</td>
<td>Return user identity</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>ipcrm</td>
<td>Remove a message queue, semaphore set, or shared memory segment identifier</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>ipcs</td>
<td>Report interprocess communication facilities status</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top">Irc<strong></strong></td>
<td valign="top">connect to Internet Relay Chat</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><a name="J"></a><strong></strong></td>
<td valign="top">Process Management: Displays active jobs and their corresponding job numbers</td>
<td valign="top"><strong>jobs </strong></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To start a job in the background:</td>
<td valign="top"><strong>job </strong> <em>&amp; </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To return a job to the foreground by the job number</td>
<td valign="top"><strong>fg </strong> <em>%number </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To send a running job to the background:</td>
<td valign="top"><strong>&lt;Control&gt;z bg </strong></td>
</tr>
<tr>
<td valign="top">join<strong></strong></td>
<td valign="top">Text Processing: Relational database operator</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><a name="K"></a><strong></strong></td>
<td valign="top">Process Management: Terminates a process by its <em><strong>p</strong></em>rocess <em><strong>i</strong></em><strong>d</strong>entification <em>n</em>umber.</td>
<td valign="top"><strong>kill </strong><em>pid </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong></td>
<td valign="top">Remove suspended process #1</td>
<td valign="top"><strong>kill %1<strong></strong></strong></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To use the strongest form of the <strong>kill</strong> command:</td>
<td valign="top"><strong>kill -9 </strong><em>pid </em></td>
</tr>
<tr>
<td valign="top">less</td>
<td valign="top">Shows file a page at a time. Like more, but you can use Page-Up too. Not on all systems</td>
<td valign="top"><strong>less</strong> <em>filename</em></td>
</tr>
<tr>
<td valign="top">Lex<strong></strong></td>
<td valign="top">C Programming: Generate programs for lexical tasks</td>
<td valign="top"></td>
</tr>
<tr>
<td>link</td>
<td>File system: Call link function</td>
<td valign="top"></td>
</tr>
<tr>
<td>Ln</td>
<td>File system: Link files</td>
<td valign="top"></td>
</tr>
<tr>
<td></td>
<td>Make symbolic links; make a link <tt><em>file2</em></tt>, which points to <tt><em>file1</em></tt></td>
<td valign="top"><tt><strong>ln -s</strong></tt><strong> </strong><tt><em>file1</em></tt><tt> <em>file2</em></tt><strong></strong></td>
</tr>
<tr>
<td>locale</td>
<td>Get locale-specific information</td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top">localedef<strong></strong></td>
<td>Define locale environment</td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top">logger<strong></strong></td>
<td valign="top">Shell programming: Log messages</td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top">login</td>
<td valign="top">Logs in the system or starts a computer session</td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top">logname<strong></strong></td>
<td valign="top">Return the user&#8217;s login name</td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top"><a name="L"></a><strong></strong></td>
<td valign="top">Ends your computer session; logs off the system</td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top"><strong>Lpr</strong></td>
<td valign="top">Text Processing: Show list of available printers and questions to direct your printing of a file to a particular printer</td>
<td valign="top"><strong>lpr </strong></td>
</tr>
<tr>
<td valign="top"><strong> </strong></td>
<td valign="top">If you put several filenames after <tt>lpr</tt>, this will typically send several files in a single print job. The <tt>-P<em>printer</em></tt> option sends the job to the specified printer. If you do not specify a <tt>-P<em>printer</em></tt> option, then <tt>lpr</tt> will use the contents of the <tt>PRINTER</tt> environment variable. You may wish to setup a default printer by putting a line like the following into your <tt>.login</tt> file: <tt>setenv PRINTER <em>mylocalprinter</em></tt></td>
<td valign="top"><strong>lpr </strong><em>files</em><strong></strong></p>
<p><strong>lpr </strong><tt>-P<em>printer</em> <em>files</em></tt><strong></strong></td>
</tr>
<tr>
<td valign="top"><strong>lprm</strong></td>
<td valign="top">Remove print job from the printer queue. You can find the job number by using lpq. Theoretically you also have to specify a printer name, but this isn&#8217;t necessary as long as you use your default printer in the department.</td>
<td valign="top"><tt><strong>lprm</strong></tt><tt> <strong>-P</strong><em>printer</em> <em>job_numbers</em></tt></p>
<p><strong> </strong></td>
</tr>
<tr>
<td valign="top">Lpq<strong></strong></td>
<td valign="top">Show the queue of jobs for a given printer or default printer in case -P<em>printer is not specified.</em> e.g. to get the job number needed for removal, or to see how many other files will be printed before yours will come out<em></em></td>
<td valign="top"><tt><strong>lpq</strong></tt><tt> -<strong>P</strong><em>printer</em></tt></p>
<p><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>ls </strong><strong></strong></td>
<td valign="top">File system: Lists the files and subdirectories in your current directory.</td>
<td valign="top"><strong>ls -Fltra </strong></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">-l     Lists long format</p>
<p>-t     Lists by modification time</p>
<p>-r     Lists in reverse order</p>
<p>-F     Lists file type with special character</p>
<p>-a     Lists all files including dot (<strong>.</strong>) files</td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top"><strong>lynx </strong><strong></strong></td>
<td valign="top">Starts a text-only web browser session at UW home page. It&#8217;s a textual World Wide Web browser</td>
<td valign="top"><strong>lynx </strong></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">Starts a Web browser session at a specific Web address.</td>
<td valign="top"><strong>lynx </strong> <em>url </em></td>
</tr>
<tr>
<td valign="top">mailx<strong></strong></td>
<td valign="top">Process messages</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top">make<strong></strong></td>
<td valign="top">Maintain, update, and regenerate groups of programs; compiles source code</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><a name="M"></a><strong></strong></td>
<td valign="top">Displays Unix Manual entry for a command.</td>
<td valign="top"><strong>man </strong> <em>command </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To search Manual Index for a keyword or topic:</td>
<td valign="top"><strong>man -k </strong> <em>keyword </em></td>
</tr>
<tr>
<td valign="top"><strong>Mc</strong></td>
<td valign="top">&#8220;midnight commander&#8221; &#8211; Interactive file explorer. Provides an alternative to many typed commands. NB not installed on many systems</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>mesg </strong><strong></strong></td>
<td valign="top">Displays your talk and write message access status.</td>
<td valign="top"><strong>mesg </strong></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To set your message status to yes or no:</td>
<td valign="top"><strong>mesg y</strong> (or <strong>n</strong>)</td>
</tr>
<tr>
<td valign="top"><strong>mkdir </strong><strong></strong></td>
<td valign="top">File system: Creates a new directory within your current directory.</td>
<td valign="top"><strong>mkdir </strong> <em>directory </em></td>
</tr>
<tr>
<td valign="top">mkfifo<strong></strong></td>
<td valign="top">File system: Make FIFO special file</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>more </strong><strong></strong></td>
<td valign="top">Text Processing: Displays a file one screen at a time. views a file, pausing every screenful. If no files are specified on the command line, then more displays standard input. For example, if you want to list a lot of files a screen at a time, type: ls | more<br />
Press space to go forward one screen, enter to go forward one line.</td>
<td valign="top"><strong>more </strong> <em>file </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">Use <strong>&lt;Spacebar&gt;</strong> to scroll forward and <strong>q</strong> to quit.</td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top"><strong>Mv </strong><strong></strong></td>
<td valign="top">File system: Moves a file to a different directory.</td>
<td valign="top"><strong>mv </strong> <em>file directory </em></p>
<p><strong>mv </strong> <em>files directory</em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">Moves a directory to a second directory.</td>
<td valign="top"><strong>mv </strong> <em>directory1 directory2 </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To rename file1 as file2:</td>
<td valign="top"><strong>mv </strong> <em>file1 file2 </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To rename directory1 as directory2:</td>
<td valign="top"><strong>mv </strong> <em>directory1 directory2 </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To inquire before overwriting an existing file:</td>
<td valign="top"><strong>mv -i </strong> <em>file1 file2 </em></td>
</tr>
<tr>
<td>netscape</td>
<td>Graphical web browser and Email Program: Mainly used for web browsing, it can also be used for sending and receiving email</td>
<td valign="top"></td>
</tr>
<tr>
<td>newgrp</td>
<td>Change to a new group</td>
<td valign="top"></td>
</tr>
<tr>
<td>nice</td>
<td>Process Management: Invoke a utility with an altered nice value to change priority of job</td>
<td valign="top"></td>
</tr>
<tr>
<td>Nl</td>
<td>Text Processing: Line numbering filter</td>
<td valign="top"></td>
</tr>
<tr>
<td>Nm</td>
<td>C Programming: Write the name list of an object file</td>
<td valign="top"></td>
</tr>
<tr>
<td>nohup</td>
<td>Process Management: Invoke a utility immune to hang-ups; it continue a job even after logout</td>
<td valign="top"></td>
</tr>
<tr>
<td>Od</td>
<td>Dump files in various formats</td>
<td valign="top"></td>
</tr>
<tr>
<td>osview</td>
<td>display the operating system statistics</td>
<td valign="top"><strong>osview</strong></td>
</tr>
<tr>
<td>paste</td>
<td>Text Processing: Merge corresponding or subsequent lines of files</td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top"><a name="P"></a><strong></strong></td>
<td valign="top">Starts program to change account password. You&#8217;ll have to type your old password before you type a new one.<br />
You won&#8217;t see the password when you type it, but you type it twice to make sure. Choose a password which can&#8217;t be easily guessed, and keep it secret.</td>
<td valign="top"></td>
</tr>
<tr>
<td>patch</td>
<td>Text Processing: Apply changes to files</td>
<td valign="top"></td>
</tr>
<tr>
<td>pathchk</td>
<td>File system: Check pathnames</td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top"><strong>pico </strong><strong></strong></td>
<td valign="top">Easy-to-use text editor: Starts the Pico text editor with a file,but not very powerful! The same as you get with the <tt>pine</tt> mailer.</td>
<td valign="top"><strong>pico </strong> <em>file </em></td>
</tr>
<tr>
<td valign="top"><strong>pine </strong><strong></strong></td>
<td valign="top">It&#8217;s an easy to use mail program. Starts the Pine® electronic mail program.</td>
<td valign="top"></td>
</tr>
<tr>
<td>Pr</td>
<td>Text Processing: Print files</td>
<td valign="top"></td>
</tr>
<tr>
<td>printenv</td>
<td>Show content of an environment variable. If <em>variable</em> is not typed, printenv will list <em>all</em> the environment variables.</td>
<td valign="top"><strong>printenv</strong> [<em>variable</em>]</td>
</tr>
<tr>
<td>printf</td>
<td>Shell programming: Write formatted output</td>
<td valign="top"></td>
</tr>
<tr>
<td>Prs</td>
<td>Print an SCCS file</td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top"><strong>Ps </strong><strong></strong></td>
<td valign="top">Process Management: Displays processes and their corresponding process identification numbers.</td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top"><strong> </strong></td>
<td valign="top">Display expanded list of all processes and typically show <em>everybody&#8217;s</em> processes.</td>
<td valign="top"><strong>ps -ef</strong></td>
</tr>
<tr>
<td valign="top"><tt>pushd</tt><strong></strong></td>
<td valign="top">Add entry to directory stack Use this to go temporarily to another directory.</td>
<td valign="top"><tt><strong>pushd</strong></tt><tt> <em>directory</em></tt></td>
</tr>
<tr>
<td valign="top"><strong> </strong></td>
<td valign="top">Type <tt>popd</tt> when you want to go back to the directory you were in when you typed <tt>pushd</tt>; means to remove entry from directory stack</td>
<td valign="top"><tt><strong>popd</strong></tt><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>pwd </strong><strong></strong></td>
<td valign="top">File system: Displays absolute pathname of current directory. i.e. show the directory that you are in (<strong>p</strong>resent <strong>w</strong>orking <strong>d</strong>irectory)</td>
<td valign="top"></td>
</tr>
<tr>
<td>qalter</td>
<td>Batch Utilities: Alter batch job</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>qdel</td>
<td>Batch Utilities: Delete batch jobs</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>qhold</td>
<td>Batch Utilities: Hold batch jobs</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>qmove</td>
<td>Batch Utilities: Move batch jobs</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>qmsg</td>
<td>Batch Utilities: Send message to batch jobs</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>qrerun</td>
<td>Batch Utilities: Rerun batch jobs</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>qrls</td>
<td>Batch Utilities: Release batch jobs</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>qselect</td>
<td>Batch Utilities: Select batch jobs</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>qsig</td>
<td>Batch Utilities: Signal batch jobs</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>qstat</td>
<td>Batch Utilities: Show status of batch jobs</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>qsub</td>
<td>Batch Utilities: Submit a script</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>quota</td>
<td>Finding out your available disk space quota. Show how your disk usage compares with your permitted maximum. Your disk usage may exceed your &#8220;quota&#8221; for a short &#8220;grace period&#8221; (typically a week), but it may never exceed your &#8220;limit&#8221;. If the grace period runs out, you will have to delete files before you can create any more.<br />
You may have to type &#8220;<tt>quota -v</tt>&#8221; to get full information.</td>
<td valign="top"><strong>quota -v<strong></strong></strong></td>
</tr>
<tr>
<td>Rcp</td>
<td>Copy files between machines (insecurely). Usage is analogous to scp.</p>
<p>This method does not use encryption, so there is a risk of your password and other data being spied on. It should be avoided wherever scp is available</td>
<td valign="top"><strong>rcp</strong> [<em>username</em>@]<em>machine</em>:<em>file</em> <em>file</em> <strong></strong></td>
</tr>
<tr>
<td>read</td>
<td>Shell programming: Read a line from standard input</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>readonly</td>
<td>Set the readonly attribute for variables</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>renice</td>
<td>Process Management: Set nice values of running processes. Your command will have less impact on other users. <em>number</em> typically ranges from 0 to 19. <em>process</em> can either be a &#8220;PID&#8221; number as reported by ps or top, or &#8220;%<em>jobnumber</em>&#8221; as reported by jobs.</td>
<td valign="top"><strong>renice</strong><strong> <em>number process</em></strong></td>
</tr>
<tr>
<td>return</td>
<td>Shell programming: Return from a function</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><a name="R"></a><strong></strong></td>
<td valign="top">File system: Permanently deletes a file.</td>
<td valign="top"><strong>rm </strong> <em>file </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To verify prior to removal</td>
<td valign="top"><strong>rm -I </strong> <em>file </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong></td>
<td valign="top">To remove directory, subdirectories with files recursively</td>
<td valign="top"><strong>rm -r</strong> <em>directory</em><strong></strong></td>
</tr>
<tr>
<td valign="top"><strong> </strong></td>
<td valign="top">To forcibly remove directory content recursively without having write permission on it</td>
<td valign="top"><strong>rm -rf</strong> <em>directory</em><strong></strong></td>
</tr>
<tr>
<td valign="top"><strong>rmdir </strong><strong></strong></td>
<td valign="top">File system: Deletes an empty directory.</td>
<td valign="top"><strong>rmdir </strong> <em>directory </em></td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To verify prior to removal</td>
<td valign="top"><strong>rmdir -i </strong> <em>directory </em></td>
</tr>
<tr>
<td valign="top"><strong>Rz</strong></td>
<td valign="top">Recieve a file (to the unix system) using zmodem</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>scp</strong></td>
<td valign="top">Copy files between machines (securely) The syntax would copy a file from a remote machine to the local machine. To do the converse, use: scp <em>file</em> [<em>username</em>@]<em>machine</em>:<em>file</em><br />
Omit the &#8220;<em>username</em>@&#8221; bit if your username on the other machine is the same as on the local machine.</td>
<td valign="top"><strong>scp</strong> [<em>username</em>@]<em>machine</em>:<em>file</em> <em>file</em> <tt><strong></strong></tt></td>
</tr>
<tr>
<td valign="top"><strong>sed</strong></td>
<td valign="top">Text Processing: Stream editor. It is most commonly used to perform search-and-replace operations on text. The following command globally replaces <em>pattern</em> with <em>replacement</em>. It also supports more complicated scripting &#8211; see the manual page</td>
<td valign="top"><tt><strong>sed</strong></tt><tt> <strong>'s/</strong><em>pattern</em>/<em>replacement</em><strong>/g'</strong> <em>[file]</em></tt></p>
<p><strong> </strong></td>
</tr>
<tr>
<td valign="top">set<strong></strong></td>
<td valign="top">Set or unset options and positional parameters. The value of shell variables can be accessed as &#8220;$variable&#8221;. Shell variables are seen only by the shell, and are not passed to commands.</td>
<td valign="top"><strong>set</strong> <em>variable</em>=<em>value</em></p>
<p><strong> </strong></td>
</tr>
<tr>
<td>setenv</td>
<td>List environmental variables.</td>
<td valign="top"><strong>setenv</strong><strong></strong></td>
</tr>
<tr>
<td></td>
<td>Set an environment variable</p>
<p>The value of environment variables can be accessed as &#8220;$<em>variable</em>&#8220;. Block capitals are conventionally used for names of environment variables. Environment variables are passed from the shell to commands, and may affect the behavior of commands (e.g. $PRINTER affects lpr).</td>
<td valign="top"><strong>setenv</strong><strong> <em>variable value</em></strong><strong></strong></td>
</tr>
<tr>
<td>sftp</td>
<td>Secure file transfer protocol</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>Sh</td>
<td>Shell programming: Shell, the standard command language interpreter</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>shift</td>
<td>Shell programming: Shift positional parameters</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>sleep</td>
<td>Shell programming: Suspend execution for an interval</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>sort</td>
<td>Text Processing: Sort, merge, or sequence check text files. Order the lines in a file or files alphabetically (this command does not alter the file or files &#8212; it merely displays the sorted output to the screen)</td>
<td valign="top"><strong>sort </strong><strong><em>files</em></strong><strong> </strong></p>
<p><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong> </strong></td>
<td valign="top">Displays contents of <em>files</em> sorted alphabetically in reverse order.</td>
<td valign="top"><strong>sort -r </strong><strong><em>files</em></strong> <strong></strong></td>
</tr>
<tr>
<td valign="top"><strong> </strong></td>
<td valign="top">Displays contents of <em>files </em>sorted numerically (puts 2 before 10 instead of after).</td>
<td valign="top"><strong>sort -n </strong><strong><em>files</em></strong><strong> </strong><strong></strong></td>
</tr>
<tr>
<td valign="top"><a name="S"></a><strong></strong></td>
<td valign="top">Checks the spelling in a file.</td>
<td valign="top"><strong>spell </strong> <em>file </em></td>
</tr>
<tr>
<td valign="top">split<strong></strong></td>
<td valign="top">Split files into pieces</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top">ssh<strong></strong></td>
<td valign="top">Connect to another machine</td>
<td valign="top"><strong>ssh </strong><strong><em>hostname</em></strong> <strong></strong></td>
</tr>
<tr>
<td valign="top"><strong>staffdir </strong><strong></strong></td>
<td valign="top">Displays the Online UW Staff Directory.</td>
<td valign="top"><strong>staffdir </strong> &#8220;<em>lastname, firstname</em>&#8220;</td>
</tr>
<tr>
<td valign="top"><strong> </strong><strong></strong></td>
<td valign="top">To display all fields:</td>
<td valign="top"><strong>staffdir -full </strong> &#8220;<em>lastname, firstname</em>&#8220;</td>
</tr>
<tr>
<td>strings</td>
<td valign="top">C Programming: Find printable strings in files</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>strip</td>
<td valign="top">C Programming: Remove unnecessary information from executable files</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>stty</td>
<td>Set the options for a terminal</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>Sz</td>
<td>Send a file (to you) using zmodem</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>tabs</td>
<td>Set terminal tabs</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>tail</td>
<td>Text Processing: Copy the last ten lines of a file</td>
<td valign="top"><strong>tail </strong> <em>file</em><strong></strong></td>
</tr>
<tr>
<td></td>
<td valign="top">Text Processing: To display the last <em>n</em> number of lines</td>
<td valign="top"><strong>tail -n </strong> <em>file </em></td>
</tr>
<tr>
<td></td>
<td>Text Processing: It skips initial n number of lines and displays rest</td>
<td valign="top"><strong>Tail +n </strong><strong><em>file</em></strong></td>
</tr>
<tr>
<td>talk</td>
<td>Initiate a conversation with another user (end conversation with Control-C); <strong>talk</strong> works only between machines of the same architecture. This feature disabled on many systems.</td>
<td valign="top"><strong>talk </strong><strong><em>user[@machine]</em></strong><strong></strong></td>
</tr>
<tr>
<td>Tar</td>
<td>The tar command stands for &#8220;tape archive&#8221;. It is the &#8220;standard&#8221; way to read and write archives (collections of files and whole directory trees. It combines multiple files into one or vice-versa; store an image of <em>dir.1</em> and it&#8217;s contents in file <em>file.1</em></td>
<td valign="top"><strong>tar -cvf </strong><em>dir.1.tar dir.1</em><strong></strong></td>
</tr>
<tr>
<td></td>
<td>Extracts (x) files from the default tape drive while listing (v = verbose) the file names to the screen</td>
<td valign="top"><strong>tar -xv </strong><em>dir.1.tar</em><strong> </strong><strong> </strong><strong></strong></td>
</tr>
<tr>
<td>tee</td>
<td>Shell programming: Duplicate standard input</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>telnet </strong><strong></strong></td>
<td valign="top">Starts a telnet session with a remote computer.</td>
<td valign="top"><strong>telnet </strong> <em>host_address </em></td>
</tr>
<tr>
<td>test</td>
<td>Shell programming: Evaluate expression</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>time</td>
<td>Process Management: Time a simple command</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>times</td>
<td>Process Management: Write process times</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>Tin, trn</td>
<td>Read Usenet newsgroups</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>top</td>
<td>Display the current, most computer-intensive commands. Press &#8220;q&#8221; to quit from the display</td>
<td valign="top"><strong>top<strong></strong></strong></td>
</tr>
<tr>
<td>touch</td>
<td>File system: Change file access and modification times</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>tput</td>
<td>Change terminal characteristics</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>Tr</td>
<td>Text Processing: Translate characters</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>trap</td>
<td>Process Management: Trap signals</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>tree</td>
<td>Draw a tree-like recursive directory listing. Not installed on many systems</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>true</td>
<td>Shell programming: Return true value</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>tsort</td>
<td>Text Processing: Topological sort</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>Tty</td>
<td>Return user&#8217;s terminal name</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>type</td>
<td>Displays how a name would be interpreted if used as a command</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>ulimit</td>
<td>Set or report file size limit</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>umask</td>
<td>Get or set the file mode creation mask means change permissions on new files</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>unalias</td>
<td>Remove alias definitions</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>uname</td>
<td>Return system name</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>uncompress</td>
<td>Expand compressed data</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>unexpand</td>
<td>Text Processing: Convert spaces to tabs</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>unget</td>
<td>Undo a previous get of an SCCS file</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>uniq</td>
<td>Text Processing: Report or filter out repeated lines in a file</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>unix2dos</td>
<td>adds CR&#8217;s to unix text files</td>
<td valign="top"><strong>unix2dos</strong> <em>&lt;file&gt; &lt;new_file&gt;</em><strong></strong></td>
</tr>
<tr>
<td>unlink</td>
<td>File system: Call the unlink function</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>unset</td>
<td>Unset values and attributes of variables and functions</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>uucp</td>
<td>System-to-system copy</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>uudecode</td>
<td>Decode a binary file</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>uuencode</td>
<td>Encode a binary file</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>uustat</td>
<td>uucp status inquiry and job control</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>uux</td>
<td>Process Management: Remote command execution</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>val</td>
<td>Validate SCCS files</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><a name="V"></a><strong></strong></td>
<td valign="top">Text Processing: Starts the vi text editor with a file.</td>
<td valign="top"><strong>vi </strong> <em>file </em></td>
</tr>
<tr>
<td valign="top"><a name="W"></a><strong></strong></td>
<td valign="top">Displays a list of who is on system and what they are doing. Especially useful: the &#8216;idle&#8217; part. This allows you to see whether they&#8217;re actually sitting there typing away at their keyboards right at the moment.</td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top">wait<strong></strong></td>
<td valign="top">Process Management: Await process completion</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td valign="top"><strong>Wc </strong><strong></strong></td>
<td valign="top">Text Processing: counts lines, words, and characters in file <em>file</em>. Variations:<br />
<strong>wc -l</strong> counts lines in file <em>file</em><br />
<strong>wc -w</strong> counts words in file <em>file</em><br />
<strong>wc -c</strong> counts characters in file <em>file</em></td>
<td valign="top"><strong>wc </strong> <strong>-lwc</strong> <em>file </em></td>
</tr>
<tr>
<td>what</td>
<td>Identify SCCS files</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td>where</td>
<td>Find out the places where a command program is installed on the system. This uses your search path ($PATH) to know where to look. If the program is installed in more than one place, the first one listed is the one which is run when you type the command.</td>
<td valign="top"><strong>where </strong><em>command</em></td>
</tr>
<tr>
<td>which</td>
<td>List location of executable <em>command</em>. It&#8217;s same as <em>where</em> command, but only lists the first occurrence of the command.</td>
<td valign="top"><strong>which </strong><em>command</em><strong></strong></td>
</tr>
<tr>
<td>who</td>
<td>Display a list of users currently logged into system</td>
<td valign="top"><strong>who</strong></td>
</tr>
<tr>
<td></td>
<td>Display list current user in that window</td>
<td valign="top"><strong>whoami</strong> or <strong>who am i<strong></strong></strong></td>
</tr>
<tr>
<td>write</td>
<td>Write to another user&#8217;s terminal, (user) is a email address; &lt;ctrl-c&gt; to end</td>
<td valign="top"><strong>write </strong><strong><em>user</em></strong><strong></strong></td>
</tr>
<tr>
<td>xargs</td>
<td>Shell programming: Construct argument lists and invoke utility</td>
<td valign="top"><strong> </strong></td>
</tr>
<tr>
<td><tt>xcal</tt></td>
<td>Graphical calculator application. Fairly intuitive to use. Type sums, or press the calculator buttons with the mouse</td>
<td valign="top"></td>
</tr>
<tr>
<td><tt>xemacs</tt></p>
<p><tt> </tt></td>
<td>Alternative version of emacs. The &#8220;normal&#8221; emacs is the GNU version. This is a slightly different version which you may or may not prefer.</td>
<td valign="top"></td>
</tr>
<tr>
<td><tt>xhost</tt></td>
<td>Permit another machine to open windows on the display. This command is insecure, because it makes no distinction between users on the remote machine. It should not be used when ssh is in use.</td>
<td valign="top"><strong>xhost</strong> <em>machine</em></td>
</tr>
<tr>
<td><tt>xman</tt></td>
<td>Graphical interface to manual pages</td>
<td valign="top"></td>
</tr>
<tr>
<td>yacc</td>
<td>C Programming: Yet another compiler compiler</td>
<td valign="top"></td>
</tr>
<tr>
<td>zcat</td>
<td>Text Processing: Expand and concatenate data</td>
<td valign="top"><strong>zcat</strong> <em>file</em></td>
</tr>
<tr>
<td>Zip</td>
<td>zip the file</td>
<td valign="top"></td>
</tr>
</tbody>
</table>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.oratraining.com%2Fblog%2F2009%2F06%2Funix-commands-quick-reference-2%2F&amp;linkname=Unix%2FLinux%20commands%20Quick%20reference"><img src="http://www.oratraining.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.oratraining.com/blog/2009/06/unix-commands-quick-reference-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unix commands Quick reference</title>
		<link>http://www.oratraining.com/blog/2009/06/unix-commands-quick-reference/</link>
		<comments>http://www.oratraining.com/blog/2009/06/unix-commands-quick-reference/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 06:07:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux/Unix/Solaris]]></category>
		<category><![CDATA[Shell scripting]]></category>

		<guid isPermaLink="false">http://www.oratraining.com/blog/?p=190</guid>
		<description><![CDATA[Special commands and characters:
Converting DOS commands to UNIX commands
There are a few command line questions that are asked very often. These questions, with answers that should be typed at your shell prompt are printed below:
DOS                 UNIX
dir ............... ls
cls ............... clear
del ............... rm
copy .............. cp
move / rename ..... mv
type .............. cat
cd ................ cd
more &#60; file ....... [...]]]></description>
			<content:encoded><![CDATA[<h2>Special commands and characters:</h2>
<h3>Converting DOS commands to UNIX commands</h3>
<p>There are a few command line questions that are asked very often. These questions, with answers that should be typed at your shell prompt are printed below:</p>
<pre><strong>DOS                 UNIX</strong>
dir ............... ls
cls ............... clear
del ............... rm
copy .............. cp
move / rename ..... mv
type .............. cat
cd ................ cd
more &lt; file ....... more file
md ................ mkdir
rd ................ rmdir
win ............... startx
(Note:  Unlike DOS, commands and their arguments MUST be separated by a space. 
For example, "cd/" doesn't work, but "cd /" does.)</pre>
<p><strong>Redirection </strong></p>
<table border="0" cellpadding="0">
<tbody>
<tr>
<td valign="top"><strong>&lt;</strong></td>
<td valign="top">Routes input to command from file</td>
</tr>
<tr>
<td valign="top"><strong>&gt;</strong></td>
<td valign="top">Routes output from command to file</td>
</tr>
<tr>
<td valign="top"><strong>&gt;&gt;</strong></td>
<td valign="top">Appends output to existing file</td>
</tr>
<tr>
<td valign="top"><strong>|</strong></td>
<td valign="top">Routes output between commands</td>
</tr>
</tbody>
</table>
<h2><span id="more-190"></span>Pipes and redirection</h2>
<h4>command &lt; file</h4>
<p>Use the contents of <em>file</em> as the input for <em>command</em></p>
<h4>command &gt; file</h4>
<p>Send the output of <em>command</em> to <em>file</em></p>
<h4>command &gt;&gt; file</h4>
<p>Append the output of <em>command</em> to the end of <em>file</em></p>
<h4>command1 | command2</h4>
<p>Use the output of <em>command1</em> as the input of <em>command2</em> This is the Unix &#8220;pipe&#8221;. The &#8220;<tt>|</tt>&#8221; is called the &#8220;pipe&#8221; symbol.</p>
<p><strong>Wildcards used in filenames </strong></p>
<table border="0" cellpadding="0">
<tbody>
<tr>
<td valign="top">*</td>
<td valign="top">Matches any number of characters</td>
</tr>
<tr>
<td valign="top">?</td>
<td valign="top">Matches one character</td>
</tr>
</tbody>
</table>
<p><strong>Control codes </strong></p>
<table border="0" cellpadding="0">
<tbody>
<tr>
<td valign="top"><strong>&lt;Control&gt;s</strong></td>
<td valign="top">Suspends the screen display</td>
</tr>
<tr>
<td valign="top"><strong>&lt;Control&gt;q</strong></td>
<td valign="top">Restarts suspended display</td>
</tr>
<tr>
<td valign="top"><strong>&lt;Control&gt;d</strong></td>
<td valign="top">Signals end of file</td>
</tr>
<tr>
<td valign="top"><strong>&lt;Control&gt;c</strong></td>
<td valign="top">Cancels a command</td>
</tr>
<tr>
<td valign="top"><strong>&lt;Control&gt;z</strong></td>
<td valign="top">Suspends a process or job:<br />
use <strong>fg</strong> to restart</td>
</tr>
<tr>
<td valign="top"><strong>&lt;Control&gt;u</strong></td>
<td valign="top">Clears the command line</td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0">
<tbody>
<tr>
<td valign="top"><strong>!<em>string</em></strong></td>
<td valign="top">Repeat last shell command that began with <em>string</em> (for example, type &#8220;!m&#8221; to repeat the last command that began with &#8220;m&#8221;)</td>
</tr>
</tbody>
</table>
<p><strong>Daemon Process</strong></p>
<p>In Unix and other computer multitasking operating systems, a <strong>daemon</strong> is a computer program that runs in the background, rather than under the direct control of a user; they are usually initiated as background processes. Typically daemons have names that end with the letter &#8220;d&#8221;: for example, syslogd, the daemon that handles the system log, or sshd, which handles incoming SSH connections.</p>
<p>In a Unix environment, the parent process of a daemon is often (but not always) the init process (PID=1). Processes usually become daemons by forking a child process and then having their parent process immediately exit, thus causing init to adopt the child process. This is a somewhat simplified view of the process as other operations are generally performed, such as disassociating the daemon process from any controlling tty. Convenience routines such as daemon(3) exist in some UNIX systems for that purpose.</p>
<p>Systems often start (or &#8220;launch&#8221;) daemons at boot time: they often serve the function of responding to network requests, hardware activity, or other programs by performing some task. Daemons can also configure hardware (like devfsd on some Linux systems), run scheduled tasks (like cron), and perform a variety of other tasks.</p>
<h2>Types of daemons</h2>
<p>In a strictly technical sense, a Unix-like system process is a daemon when its parent process terminates and is therefore &#8216;adopted&#8217; by the init process (process number 1) as its parent process and has no controlling terminal. However, more commonly, a daemon may be any background process, whether a child of <tt>init</tt> or not.</p>
<p>The common method for a process to become a daemon involves:</p>
<ul type="disc">
<li>Disassociating from the controlling tty</li>
<li>Becoming a session leader</li>
<li>Becoming a process group leader</li>
<li>Staying in the background by forking and exiting (once or twice). This is required sometimes for the process to become a session leader. It also allows the parent process to continue its normal execution. This idiom is sometimes summarized with the phrase &#8220;fork off and die&#8221;</li>
<li>Setting the root directory (&#8220;/&#8221;) as the current working directory so that the process will not keep any directory in use that may be on a mounted file system (allowing it to be unmounted).</li>
<li>Changing the umask to 0 to allow open(), creat(), et al. calls to provide their own permission masks and not to depend on the umask of the caller</li>
<li>Closing all inherited open files at the time of execution that are left open by the parent process, including file descriptors 0, 1 and 2 (stdin, stdout, stderr). Required files will be opened later.</li>
<li>Using a logfile, the console, or /dev/null as stdin, stdout, and stderr</li>
</ul>
<p>This is a <strong>list of Unix daemons</strong> that are found on various flavors of Unix. Unix daemons will typically consist of an abbreviation ending with a <em>d</em>. The current state of these processes can be listed with the full-output option of the process status (ps) command.</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<p align="center"><strong>Process</strong></p>
</td>
<td>
<p align="center"><strong>Description</strong></p>
</td>
</tr>
<tr>
<td>
<p align="center"><strong>init</strong></p>
</td>
<td>The Unix program which spawns all other processes.</td>
</tr>
<tr>
<td>
<p align="center"><strong>biod</strong></p>
</td>
<td>Works in cooperation with the remote nfsd to handle client NFS requests.</td>
</tr>
<tr>
<td>
<p align="center"><strong>dhcpd</strong></p>
</td>
<td>Dynamically configure TCP/IP information for clients.</td>
</tr>
<tr>
<td>
<p align="center"><strong>fingerd</strong></p>
</td>
<td>Provides a network interface for the finger protocol, as used by the <em>finger</em> command.</td>
</tr>
<tr>
<td>
<p align="center"><strong>ftpd</strong></p>
</td>
<td>Services FTP requests from a remote system. It listens at the port specified in the services file for ftp.</td>
</tr>
<tr>
<td>
<p align="center"><strong>httpd</strong></p>
</td>
<td>Web serve daemon.</td>
</tr>
<tr>
<td>
<p align="center"><strong>inetd</strong></p>
</td>
<td>Listens for network connection requests. If a request is accepted, it can launch a background daemon to handle the request. Some systems use the replacement command <strong>xinetd</strong>.</td>
</tr>
<tr>
<td>
<p align="center"><strong>lpd</strong></p>
</td>
<td>The line printer daemon that manages printer spooling.</td>
</tr>
<tr>
<td>
<p align="center"><strong>nfsd</strong></p>
</td>
<td>Processes NFS operation requests from client systems. Historically each nfsd daemon handled one request at a time, so it was normal to start multiple copies.</td>
</tr>
<tr>
<td>
<p align="center"><strong>ntpd</strong></p>
</td>
<td>Network Time Protocol daemon that manages clock synchronization across the network. <strong>xntpd</strong> implements the version 3 standard of NTP.</td>
</tr>
<tr>
<td>
<p align="center"><strong>rpcbind</strong></p>
</td>
<td>Handles conversion of remote procedure calls (RPC), such as from ypbind.</td>
</tr>
<tr>
<td>
<p align="center"><strong>sshd</strong></p>
</td>
<td>Listens for secure shell requests from clients.</td>
</tr>
<tr>
<td>
<p align="center"><strong>sendmail</strong></p>
</td>
<td>SMTP daemon.</td>
</tr>
<tr>
<td>
<p align="center"><strong>swapper</strong></p>
</td>
<td>Copies process regions to swap space in order to reclaim physical pages of memory for the kernel. Also called <strong>sched</strong>.</td>
</tr>
<tr>
<td>
<p align="center"><strong>syslogd</strong></p>
</td>
<td>System logger process that collects various system messages.</td>
</tr>
<tr>
<td>
<p align="center"><strong>syncd</strong></p>
</td>
<td>Periodically keeps the file systems synchronized with system memory.</td>
</tr>
<tr>
<td>
<p align="center"><strong>xfsd</strong></p>
</td>
<td>Serve X11 fonts to remote clients.</td>
</tr>
<tr>
<td>
<p align="center"><strong>vhand</strong></p>
</td>
<td>Releases pages of memory for use by other processes. Also known as the &#8220;page stealing daemon&#8221;</td>
</tr>
<tr>
<td>
<p align="center"><strong>ypbind</strong></p>
</td>
<td>Find the server for an NIS domain and store the information in a file.</td>
</tr>
</tbody>
</table>
<h2>System Security</h2>
<p>The following mechanism is the ONLY guaranteed method of protecting your work.</p>
<p>Each file and directory is owned by a user, and each user belongs to a group. By default, users own their home directory (the current directory when the user logs in) and the contents of the home directory. Most other files and directories are owned by &#8220;root&#8221; and other special users. The user assigns a type of privilege to each file and directory owned by the user. By default, the privilege is <strong>rwxr-xr-x</strong>.</p>
<p>The first three characters of <strong>rwxr-xr-x</strong> indicate that the owner can <strong>r</strong>ead, <strong>w</strong>rite, and e<strong>x</strong>ecute the file (or directory). The middle three characters indicate that all other users in the same group as the owner can <strong>r</strong>ead and e<strong>x</strong>ecute the file (or directory), but cannot write onto the file (or directory), as indicated by the middle &#8220;<strong>-</strong>&#8221; character. The last three characters indicate that everyone else on the system can <strong>r</strong>ead and e<strong>x</strong>ecute the file (or directory), but cannot write onto the file (or directory), as indicated by the last &#8220;<strong>-</strong>&#8221; character.</p>
<p>To change the owner&#8217;s permissions of a file (or directory), the owner can type:</p>
<pre><strong>chown u+r <em>file.1</em>   chown u+w <em>file.1</em>   chown u+x <em>file.1</em></strong></pre>
<pre><strong>chown u-r <em>file.1</em>   chown u-w <em>file.1</em>   chown u-x <em>file.1</em></strong></pre>
<p>To change the group&#8217;s permissions of a file (or directory), the owner can type:</p>
<pre><strong>chown g+r <em>file.1</em>   chown g+w <em>file.1</em>   chown g+x <em>file.1</em></strong></pre>
<pre><strong>chown g-r <em>file.1</em>   chown g-w <em>file.1</em>   chown g-x <em>file.1</em></strong></pre>
<p>To change the permissions of a file (or directory) for everyone else, the owner can type:</p>
<pre><strong>chown o+r <em>file.1</em>   chown o+w <em>file.1</em>   chown o+x <em>file.1</em></strong></pre>
<pre><strong>chown o-r <em>file.1</em>   chown o-w <em>file.1</em>   chown o-x <em>file.1</em></strong></pre>
<p><a name="type_shortcuts"></a></p>
<h2>
<hr size="2" /></h2>
<h2>Typing Shortcuts</h2>
<ul>
<li><em>file*</em> specifies all files and sub-directories that start with &#8220;file&#8221; and have 0 or more extra characters. <em>*file*</em> specifies all files and sub-directories that contain the string &#8220;file&#8221; anywhere in their name. <em>fi*le</em> specifies all files and sub-directories that start with &#8220;fi&#8221; and end with &#8220;le&#8221;, with 0 or more extra characters.</li>
<li><em>file?</em> specifies all files and sub-directories that start with &#8220;file&#8221; and have one extra character.</li>
<li>The current directory can be specified as &#8220;.&#8221;, and the parent directory of the current directory can be specified as &#8220;..&#8221;. For example, if the current directory is <strong>/usr/people/mpagel</strong>, I can copy the file <strong>/usr/people/huffman/Crambin.pdb</strong> to <strong>/usr/people/mpagel/pdb/</strong> by typing:</li>
</ul>
<pre><strong>     cp  ../huffman/Crambin.pdb  ./pdb/</strong></pre>
<ul>
<li>Text on the screen can be highlighted by sweeping the mouse cursor over the text while pressing and holding the left mouse button. This text can be inserted at the command line by clicking the center mouse button, regardless of the mouse cursor position (as long as the mouse cursor remains in the window).</li>
<li>If you type the first part of the name of a file or sub-directory in the current directory and then hit the <strong>&lt;Esc&gt;</strong> escape key, the workstation will complete the name for you. For example, if the current directory contains the files <strong>template.001</strong> and <strong>temporary.stuff</strong>, then I can type:<br />
<strong>more templ&lt;Esc&gt;</strong><br />
and the workstation will complete the name <strong>template.001</strong>. Note that if I type:<br />
<strong>more temp&lt;Esc&gt;</strong><br />
then the workstation will NOT complete the file name, since I have not specified enough characters to unambiguously specify <strong>template.001</strong> instead of <strong>temporary.stuff</strong>.</li>
<li><strong>history</strong> Shows list of last 100 commands</li>
</ul>
<p><strong>!!</strong> Repeats last command</p>
<p><strong>!32</strong> Repeats command #32 in the history list</p>
<p><strong>!mor</strong> Repeats last command starting with &#8220;mor&#8221;</p>
<p>•·         If I type <strong>mv file.1 dir.1</strong> to move <em>file.1</em> to <em>dir.1</em>, then I can move <em>file.2</em> to <em>dir.1</em> by typing <strong>^1^2</strong>, which does the following command: <strong>mv <em>file.2 dir.1</em></strong>. Note that the only the first &#8220;1&#8243; (in <em>file.1</em>) changes, and the &#8220;1&#8243; in <em>dir.1</em> does NOT change.</p>
<p>•·         Many commands have &#8216;modifiers&#8217;. For example, <strong>ls -l</strong> has a modifier &#8220;-l&#8221; which specifies that the LONG listing of the directory contents should be printed. Many modifiers can be combined in any order in one command. For example <strong>ls -la</strong> specifies the LONG listing of ALL directory contents.</p>
<p>•·         The &#8220;|&#8221; character is called the PIPE character. This character is located on the key <em>just above</em> the &lt;Enter&gt; key on the SGI keyboard (you must also hold down the &lt;shift&gt; key). The pipe character is used to direct the output of one command into the input of a second command. For example,</p>
<p><strong>ps -ef | grep biosym</strong><br />
first creates a list of processes (<strong>ps -ef</strong>) and then filters this list to show all lines that contain &#8220;biosym&#8221; (<strong>grep biosym</strong>).</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.oratraining.com%2Fblog%2F2009%2F06%2Funix-commands-quick-reference%2F&amp;linkname=Unix%20commands%20Quick%20reference"><img src="http://www.oratraining.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.oratraining.com/blog/2009/06/unix-commands-quick-reference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PL/SQL quick reference</title>
		<link>http://www.oratraining.com/blog/2009/06/plsql-quick-reference/</link>
		<comments>http://www.oratraining.com/blog/2009/06/plsql-quick-reference/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 05:48:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Database programming]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Oracle PL/SQL]]></category>
		<category><![CDATA[Oracle developers]]></category>

		<guid isPermaLink="false">http://www.oratraining.com/blog/?p=185</guid>
		<description><![CDATA[
Oracle PL/SQL Quick Reference

 
PL/SQL Block Structure

DECLARE --Optional

  --Variables, Cursors, User-defined exceptions

BEGIN --Mandatory

  --SQL statements

  --PL/SQL statements

EXCEPTION --Optional

  --Actions to perform when errors occur

END; --Mandatory

 

PL/SQL Block Type

Anonymous               Procedure               Function

[DECLARE]               PROCEDURE name          FUNCTION name

                        IS                      RETURN datatype                                                         IS

BEGIN                   BEGIN                   BEGIN

  --statements          [...]]]></description>
			<content:encoded><![CDATA[<pre>
<h2><strong>Oracle PL/SQL Quick Reference</strong></h2>

<strong> </strong>
<h3>PL/SQL Block Structure</h3>

DECLARE --Optional

  --Variables, Cursors, User-defined exceptions

BEGIN --Mandatory

  --SQL statements

  --PL/SQL statements

EXCEPTION --Optional

  --Actions to perform when errors occur

END; --Mandatory

<span id="more-185"></span> 

<strong>PL/SQL Block Type</strong>

<strong>Anonymous               Procedure               Function</strong>

[DECLARE]               PROCEDURE name          FUNCTION name

                        IS                      RETURN datatype                                                         IS

BEGIN                   BEGIN                   BEGIN

  --statements            --statements            --statements

                                                  RETURN value;

[EXCEPTION]             [EXCEPTION]             [EXCEPTION]

END ;                   END ;                   END ;

<strong> </strong>

<strong>Declaring PL/SQL Variables</strong>

identifier [CONSTANT] datatype [NOT NULL]

   [:=|DEFAULT expr];

<strong> </strong>

<strong>Assigning Values to Variables</strong>

identifier := expr;

<strong>Types of Variables</strong>

<strong>PL/SQL variables:</strong>
<ul type="disc">
<li>Scalar</li>
<li>Composite</li>
<li>Reference</li>
<li>LOB(<strong>L</strong>arge <strong>OB</strong>jects)</li>
</ul>

<strong>Non-PL/SQL variables:</strong> Bind or host variables
<ul type="disc">
<li>Used to pass run time values out of the PL/SQL block back to the Host environment</li>
</ul>

<strong> </strong>

<strong>Base Scalar Datatypes</strong>

VARCHAR2(maximum_length)      BOOLEAN           CHAR[(maximum_length)]

DATE                         LONG              LONG RAW    

BINARY_INTEGER                PLS_INTEGER       NUMBER(precision,scale)

TIMESTAMP

<strong>The %TYPE Attribute</strong>

Identifier Table_name.column_name%TYPE ;

Identifier Variable_name%TYPE ;

<strong> </strong>

<strong>Composite Datatypes</strong>

INDEX BY TABLE          RECORD      NESTED TABLE      VARRAY

<strong> </strong>

<strong>LOB Datatypes</strong>

CLOB        BLOB        BFILE             NCLOB

<strong> </strong>

<strong>Creating Bind Variables</strong>

VARIABLE variable_name dataype

<strong> </strong>

<strong>Displaying Bind Variables</strong>

PRINT [variable_name]

<em>NOTE: To reference a bind variable in PL/SQL, you must prefix it's name with colon (:)</em>

<strong>Commenting Code</strong>

--prefix single-line comments with two dashes

/* Place muti-line comment between the symbols */

<strong> </strong>

<strong>SELECT Statements in PL/SQL</strong>

SELECT {column_list|*}

INTO {variable_name[,variable_name]...

      |record_name}

FROM table

[WHERE condition];

<em>NOTE: The INTO clause is must and queries must return one and only one row. A CURSOR can be used to retrieve more than one row.</em>

<em> </em>

<strong>Implicit Cursor Attributes for DML statements</strong>

SQL%ROWCOUNT

SQL%FOUND

SQL%NOTFOUND

SQL%ISOPEN

<strong> </strong>

<strong>Control Structures</strong>

<strong>IF Statement                              Basic Loop</strong>

IF condition THEN                         LOOP

   statements;                               statements;

[ELSIF condition THEN                        ...

   statements;]                              EXIT [WHEN condition];

[ELSE                                     END LOOP;

   statements;]

END IF;

<strong> </strong>

<strong>FOR Loop                                  WHILE Loop</strong>

FOR counter IN [REVERSE]                  WHILE condition LOOP

   Lower_bound..upper_bound LOOP             statement1;

   statement1;                               statement2;

   statement2;                               ...

   ...                                    END LOOP;

END LOOP;

<strong> </strong>

<strong>CASE</strong>

CASE selector

   WHEN expression1 THEN result1

   WHEN expression2 THEN result2

   ...

   WHEN expressionN THEN resultN

   [ELSE resultN+1]

END;

<strong>Creating a PL/SQL Record</strong>

TYPE type_name IS RECORD

(field_declaration[,field_declaration]...) ;

identifier type_name ;

<strong> </strong>

<strong>Where field_declaration is:</strong>

field_name {field_type|variable%TYPE|

table.column%TYPE|table%ROWTYPE}

[[NOT NULL] {:=|DEFAULT} expr]

<strong> </strong>

<strong>Referencing Fields in the Record</strong>

record_name.field_name

<strong> </strong>

<strong>Declaring Records with the %ROWTYPE Attribute</strong>

DECLARE

record_name       reference%ROWTYPE

<strong> </strong>

<strong>Creating a PL/SQL Table (INDEX BY Table)</strong>

TYPE type_name IS TABLE OF

{column_type|variable%TYPE|table.column%TYPE

|variable%ROWTYPE} [NOT NULL]

[INDEX BY BINARY_INTEGER];

identifier type_name ;

<strong> </strong>

<strong>Referencing a PL/SQL table</strong>

pl_sql_table_name(primary_key_value)

<strong>Using PL/SQL Table Method</strong>

table_name.method_name[(parameters)]

<strong> </strong>

<strong>PL/SQL Table Methods</strong>

EXITS(n)    COUNT       FIRST       LAST        PRIOR(n)

NEXT(n)     EXTEND(n,i)             TRIM        DELETE

<strong>PL/SQL Table of Records</strong>

TYPE table_name_type IS TABLE OF table_name%ROWTYPE

INDEX BY BINARY_INTEGER ;

table_name table_name_type ;

<strong> </strong>

<strong>Referencing a Table of Records</strong>

table_name(index).field

<strong> </strong>

<strong>Cursor</strong>

<strong>Declaring the Cursor in Declaration Section</strong>

CURSOR cursor_name IS select_statement ;

record_name cursor_name%ROWTYPE ;

<strong> </strong>

<strong>Opening and Closing the Cursor</strong>

OPEN cursor_name ;

CLOSE cursor_name ;

<strong> </strong>

<strong>Fetching Data from the Cursor</strong>

FETCH cursor_name

INTO [variable1(,variable2,...)

    |record_name] ;

<strong> </strong>

<strong>Explicit Cusor Attributes</strong>

cursor_name%ISOPEN

cursor_name%NOTFOUND

cursor_name%FOUND

cursor_name%ROWCOUNT

<strong> </strong>

<strong>Cursor FOR Loops</strong>

FOR record_name IN cursor_name LOOP

   statement1;

   statement2;

   ...

END LOOP;

<strong> </strong>

<strong>Cursor FOR Loops Using Subqueries</strong>

FOR record_name IN (subqueries) LOOP

statement1

...

END LOOP ;

<strong> </strong>

<strong>Cursors with Parameters</strong>

CURSOR cursor_name [(cursor_parameter_name datatype

[,...])]

IS select_statement

[FOR UPDATE [OF column_reference][NOWAIT]];

<strong> </strong>

<strong>Parameter Name</strong>

cursor_parameter_name [IN] datatype [{:=|DEFAULT}expr]

<strong> </strong>

<strong>Openning with Parameters</strong>

OPEN cursor_name(cursor_parameter_name[,...]);

<strong> </strong>

<strong>Cursor FOR Loops with parameters</strong>

FOR record_name IN cursor_name(cursor_parameter_name

[,...]) LOOP

   statement1;

   statement2;

   ...

END LOOP;

<strong> </strong>

<strong>WHERE CURRENT OF clause</strong>

UPDATE|DELETE ... WHERE CURRENT OF cursor_name ;

<strong> </strong>

<strong>Predefined Exceptions</strong>

NO_DATA_FOUND

TOO_MANY_ROWS

INVALID_CURSOR

ZERO_DIVIDE

DUP_VAL_ON_INDEX

<strong> </strong>

<strong>Exception</strong>

<strong>Trapping Exceptions</strong>

EXCEPTION

   WHEN exception1 [OR exception2 ...] THEN

statement1 ;

statement2 ;

...

   [WHEN exception3 [OR exception4 ...] THEN

statement1 ;

statement2 ;

...]

   [WHEN OTHERS THEN

statement1 ;

statement2 ;

...]

<strong> </strong>

<strong>Declaring Non-Predefined Oracle Sever Exception</strong>

DECLARE

   exception EXCEPTION ;

   PRAGMA EXCEPTION_INIT(exception, error_number) ;

<strong> </strong>

<strong>Referencing the declared Non-predefined execption</strong>

BEGIN

   ...

EXCEPTION

   WHEN exception THEN

statement1 ;

...

END ;

<strong>Trapping User-Defined Exceptions</strong>

DECLARE

   exception EXCEPTION ;

BEGIN

   ...

   IF SQL%NOTFOUND THEN

RAISE exception ;

   END IF ;

   ...

EXCEPTION

   WHEN exception THEN

statement1 ;

...

END ;

<strong>Functions for Trapping Exceptions</strong>

SQLCODE           return error code

SQLERRM           return error message

<strong> </strong>

<strong>RAISE_APPLICATION_ERROR</strong><strong> procedure(Executable/Exception</strong>

<strong>Section)</strong>

RAISE_APPLICATION_ERROR ( error_number,

  message [, {TRUE|FALSE}]) ;

error_number      between -20000 to -20999

message           string up to 2,048 bytes long

TRUE              placed on the stack of previous errors.

FALSE             replaces all previous errors

<strong> </strong></pre>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.oratraining.com%2Fblog%2F2009%2F06%2Fplsql-quick-reference%2F&amp;linkname=PL%2FSQL%20quick%20reference"><img src="http://www.oratraining.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.oratraining.com/blog/2009/06/plsql-quick-reference/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Oracle SQL Quick reference</title>
		<link>http://www.oratraining.com/blog/2009/06/sq-quick-referenence/</link>
		<comments>http://www.oratraining.com/blog/2009/06/sq-quick-referenence/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 05:44:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle SQL]]></category>

		<guid isPermaLink="false">http://www.oratraining.com/blog/?p=182</guid>
		<description><![CDATA[Oracle SQL Quick Reference 
SELECT Query Statement
SELECT [DISTINCT] {*, column [alias],&#8230;}
FROM table
WHERE condition(s)]
ORDER BY {column, exp, alias} [ASC&#124;DESC]]
NOTE: 
Avoid using DISTINCT with large table as it first does sorting of all the rows and then eliminates duplicate rows, so need a full table scan and thus it&#8217;s very slow.
 
ORDER BY is the last clause [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Oracle SQL Quick Reference</strong><strong> </strong></p>
<p><strong>SELECT Query Statement</strong></p>
<p>SELECT [DISTINCT] {*, column [alias],&#8230;}</p>
<p>FROM table</p>
<p>WHERE condition(s)]</p>
<p>ORDER BY {column, exp, alias} [ASC|DESC]]</p>
<p><strong><em>NOTE:</em></strong><em> </em></p>
<p><em>Avoid using DISTINCT with large table as it first does sorting of all the rows and then eliminates duplicate rows, so need a full table scan and thus it&#8217;s very slow.</em></p>
<p><em> </em></p>
<p><em>ORDER BY is the last clause to get executed and thus could see all the column aliases; You can sort by a columns that is not in SELECT list; Default sorting order is Ascending (ASC)</em></p>
<p><span id="more-182"></span></p>
<p><strong>Joins</strong></p>
<p><strong>Oracle proprietary syntax for version 8i and earlier</strong></p>
<p><strong>Cartesian Product</strong></p>
<p>SELECT table1.*, table2.*,[...]</p>
<p>FROM table1,table2[,...]</p>
<p><strong> </strong></p>
<p><strong>Equijoin(Simple joins or inner join)</strong></p>
<p>SELECT table1.*,table2.*</p>
<p>FROM table1,table2</p>
<p>WHERE table1.column = table2.column</p>
<p><strong> </strong></p>
<p><strong>Non-Equijoin</strong></p>
<p>SELECT table1.*, table2.*</p>
<p>FROM table1, table2</p>
<p>WHERE table1.column</p>
<p>BETWEEN table2.column1 AND table2.column2</p>
<p><strong> </strong></p>
<p><strong>Outer join</strong></p>
<p>SELECT table1.*,table2.*</p>
<p>FROM table1,table2</p>
<p>WHERE table1.column(+) = table2.column</p>
<p>SELECT table1.*,table2.*</p>
<p>FROM table1,table2</p>
<p>WHERE table1.column = table2.column(+)</p>
<p><strong> </strong></p>
<p><strong>Self join</strong></p>
<p>SELECT alias1.*,alias2.*</p>
<p>FROM table1 alias1,table1 alias2</p>
<p>WHERE alias1.column = alias2.column</p>
<p><strong>SQL: 1999 compliant syntax for version 9i</strong></p>
<p>SELECT table1.column, table2.column</p>
<p>FROM table1</p>
<p>[<strong>CROSS JOIN</strong> table2] |</p>
<p>[<strong>NATURAL JOIN</strong> table2] |</p>
<p>[<strong>JOIN</strong> table2 <strong>USING</strong> (column_name)] |</p>
<p>[<strong>JOIN</strong> table2</p>
<p><strong>ON</strong> (table1.column_name=table2.column_name)] |</p>
<p>[<strong>LEFT</strong>|<strong>RIGHT</strong>|<strong>FULL</strong> <strong>OUTER</strong> <strong>JOIN</strong> table2</p>
<p><strong>ON</strong> (table1.column_name=table2.column_name)];</p>
<p><strong> </strong></p>
<p><strong>Aggregation Selecting</strong></p>
<p>SELECT [column,] group_function(column),&#8230;</p>
<p>FROM table</p>
<p>[WHERE condition]</p>
<p>[GROUP BY group_by_expression]</p>
<p>[HAVING group_condition]</p>
<p>[ORDER BY column];</p>
<p><strong> </strong></p>
<p><strong>Group function</strong></p>
<p>AVG([DISTINCT|ALL]n)</p>
<p>COUNT(*|[DISTINCT|ALL]expr)</p>
<p>MAX([DISTINCT|ALL]expr)</p>
<p>MIN([DISTINCT|ALL]expr)</p>
<p>STDDEV([DISTINCT|ALL]n)</p>
<p>SUM([DISTINCT|ALL]n)</p>
<p>VARIANCE([DISTINCT|ALL]n)</p>
<p><strong> </strong></p>
<p><strong>NOTE:</strong></p>
<p><em>All columns in the SELECT list that are not in group functions must be in the GROUP BY clause; but GROUP BY column does not have to be in the SELECT list.</em></p>
<p><em> </em></p>
<p><em>You can not use group functions in the WHERE clause;You use the HAVING clause to restrict groups.</em></p>
<p><em>All group functions except count(*) ignores null values. The NVL function forces group functions to include null values.</em></p>
<p><strong> </strong></p>
<p><strong>Subquery</strong></p>
<p>SELECT select_list</p>
<p>FROM table</p>
<p>WHERE expr operator(SELECT    select_list</p>
<p>FROM      table);</p>
<p><strong>NOTE:</strong></p>
<p><em>The subquery(inner query) executes once before the main query</em></p>
<p><em> </em></p>
<p><em>The result of the subquery is used by the main query(outer query)</em></p>
<p><em> </em></p>
<p><em>The ORDER BY clause in the subquery is not needed unless you are performing TOP-N analysis.</em></p>
<p><strong>single-row comparison operators: </strong>Return only one row</p>
<p>=        &gt;     &gt;=    &lt;     &lt;=    &lt;&gt;</p>
<p><strong>multiple-row comparison operators: </strong>Return more than one row</p>
<p>IN         ANY             ALL</p>
<p><strong> </strong></p>
<p><strong>Multiple-column Subqueries</strong></p>
<p>SELECT column, column, &#8230;</p>
<p>FROM table</p>
<p>WHERE (column, column, &#8230;) IN</p>
<p>(SELECT column, column, &#8230;</p>
<p>FROM table</p>
<p>WHERE condition);</p>
<p><strong>Data Manipulation Statements (DML)</strong></p>
<p><strong>INSERT Statement(one row)</strong></p>
<p>INSERT INTO table [ (column [,column...])]</p>
<p>VALUES (value [,value...]);</p>
<p><strong> </strong></p>
<p><strong>INSERT Statement with Subquery</strong></p>
<p>INSERT INTO table [ column(, column) ]</p>
<p>subquery;</p>
<p><strong> </strong></p>
<p><strong>UPDATE Statement</strong></p>
<p>UPDATE table</p>
<p>SET column = value [, column = value,...]</p>
<p>[WHERE condition];</p>
<p><strong> </strong></p>
<p><strong>Updating with Multiple-column Subquery</strong></p>
<p>UPDATE table</p>
<p>SET (column, column,&#8230;) =</p>
<p>(SELECT column, column,&#8230;</p>
<p>FROM table</p>
<p>WHERE condition)</p>
<p>WHERE condition;</p>
<p><strong> </strong></p>
<p><strong>Deleting Rows with DELETE Statement</strong></p>
<p>DELETE [FROM] table</p>
<p>[WHERE condition];</p>
<p><strong> </strong></p>
<p><strong>Deleting Rows Based on Another Table</strong></p>
<p>DELETE FROM table</p>
<p>WHERE column = (SELECT column</p>
<p>FROM table</p>
<p>WHERE condition);</p>
<p><strong>MERGE statement</strong></p>
<p>MERGE INTO table_name table_aliase</p>
<p>USING (table|view|sub_query) alias</p>
<p>ON (join condition)</p>
<p>WHEN MATCHED THEN</p>
<p>UPDATE SET</p>
<p>col1 = col1_val,</p>
<p>col2 = col2_val</p>
<p>WHEN NOT MATCHED THEN</p>
<p>INSERT (column_list)</p>
<p>VALUES (column_values);</p>
<p><strong>NOTE:</strong></p>
<p>MERGE provides ability to conditionally update or insert data into a database table. It is useful in data warehousing applications. It avoids separate updates; increase performance and ease of use</p>
<p><strong> </strong></p>
<p><strong>Transaction Control Statements (TCL)</strong></p>
<p>COMMIT;</p>
<p>SAVEPOINT name;</p>
<p>ROLLBACK [TO SAVEPOINT name];</p>
<p><strong> </strong></p>
<p><strong>Displaying table structure</strong></p>
<p>DESC[RIBE] tablename</p>
<p><strong>Data Definition Statemetns (DDL)</strong></p>
<p><strong>CREATE TABLE Statement</strong></p>
<p>CREATE TABLE [schema.]table</p>
<p>(column datatype [DEFAULT expr] [,...]);</p>
<p><strong> </strong></p>
<p><strong>CREATE TABLE Statement with Subquery</strong></p>
<p>CREATE TABLE [schema.]table</p>
<p>[(column, column...)]</p>
<p>AS subquery;</p>
<p><strong>NOTE: </strong></p>
<p><em>When a table is created using existing table except &#8220;NOT NULL&#8221; constraint, no other constraints are copied. If condition satisfied even rows are copied.</em></p>
<p><em> </em></p>
<p><strong> </strong></p>
<p><strong>Datatype</strong></p>
<p>VARCHAR2(size)    CHAR(size)        NUMBER(p,s)       DATE</p>
<p>LONG              CLOB              RAW               LONG RAW</p>
<p>BLOB              BFILE             ROWID</p>
<p><strong> </strong></p>
<p><strong>ALTER TABLE Statement </strong></p>
<p><strong>Adding columns</strong></p>
<p>ALTER TABLE table_name</p>
<p>ADD (column datatype [DEFAULT expr]</p>
<p>[, column datatype]&#8230;);</p>
<p><strong> </strong></p>
<p><strong>Changing a column&#8217;s type, size and default value of a Table</strong></p>
<p>ALTER TABLE table_name</p>
<p>MODIFY (column datatype [DEFAULT expr]</p>
<p>[, column datatype]&#8230;);</p>
<p><strong>RENAMING table column: </strong>Supported by 9.2 and higher version only<strong> </strong></p>
<p>ALTER TABLE table_name</p>
<p>RENAME column_name to new_column_name;</p>
<p><strong> </strong></p>
<p><strong>Dropping a column</strong></p>
<p>ALTER TABLE table_name</p>
<p>DROP (column);</p>
<p><strong> </strong></p>
<p><strong>Dropping a Table</strong></p>
<p>DROP TABLE table_name;</p>
<p><strong> </strong></p>
<p><strong>Changing the Name of an Object</strong></p>
<p>RENAME old_name TO new_name;</p>
<p><strong> </strong></p>
<p><strong>Trancating a Table</strong></p>
<p>TRUNCATE TABLE table_name;</p>
<p><strong> </strong></p>
<p><strong>Adding Comments to a Table</strong></p>
<p>COMMENT ON TABLE table_name | COLUMN table.column</p>
<p>IS &#8216;text&#8217;;</p>
<p><strong> </strong></p>
<p><strong>Dropping a comment from a table</strong></p>
<p>COMMENT ON TABLE table_name | COLUMN table.column IS &#8221; ;</p>
<p><strong> </strong></p>
<p><strong>Data Dictionary</strong></p>
<p>ALL_OBJECTS       USER_OBJECTS</p>
<p>ALL_TABLES        USER_TABLES</p>
<p>ALL_CATALOG       USER_CATALOG or CAT</p>
<p>ALL_COL_COMMENTS USER_COL_COMMENTS</p>
<p>ALL_TAB_COMMENTS USER_TAB_COMMENTS</p>
<p><strong> </strong></p>
<p><strong>Defining Constraints</strong></p>
<p>CREATE TABLE [schema.]table</p>
<p>column datatype [DEFAULT expr][NOT NULL]</p>
<p>[column_constraint],&#8230;</p>
<p>[table_constraint][,...]);</p>
<p><strong> </strong></p>
<p><strong>Column constraint level</strong></p>
<p>column [CONSTRAINT constraint_name] constraint_type,</p>
<p><strong> </strong></p>
<p><strong>Constraint_type</strong></p>
<p>PRIMARY KEY REFERENCES table(column) UNIQUE</p>
<p>CHECK (condition)</p>
<p><strong> </strong></p>
<p><strong>Table constraint level</strong>(except NOT NULL)</p>
<p>column,&#8230;,[CONSTRAINT constraint_name]</p>
<p>constraint_type (column,&#8230;),</p>
<p><strong> </strong></p>
<p><strong>NOT NULL Constraint (Only Column Level)</strong></p>
<p>CONSTRAINT table[_column...]_nn NOT NULL &#8230;</p>
<p><strong> </strong></p>
<p><strong>UNIQUE Key Constraint</strong></p>
<p>CONSTRAINT table[_column..]_uk UNIQUE (column[,...])</p>
<p><strong> </strong></p>
<p><strong>PRIMARY Key Constraint</strong></p>
<p>CONSTRAINT table[_column..]_pk PRIMARY (column[,...])</p>
<p><strong> </strong></p>
<p><strong>NOTE: </strong></p>
<p><em>PRIMARY Key defined on more than column called &#8216;Composite Primary Key&#8217; and to define composite primary key you need table level constraint as two columns are involved.</em></p>
<p><strong> </strong></p>
<p><strong>FOREIGN Key Constraint</strong></p>
<p>CONSTRAINT table[_column..]_fk</p>
<p>FOREIGN KEY (column[,...])</p>
<p>REFERENCES table (column[,...])[ON DELETE CASCADE]</p>
<p>[ON DELETE SET NULL];</p>
<p><strong> </strong></p>
<p><strong>CHECK constraint</strong></p>
<p>CONSTRAINT table[_column..]_ck CHECK (condition)</p>
<p><strong> </strong></p>
<p><strong>Adding a Constraint</strong>(except NOT NULL)</p>
<p>ALTER TABLE table_name</p>
<p>ADD [CONSTRAINT constraint_name ] type (column);</p>
<p><strong> </strong></p>
<p><strong>Adding a NOT NULL constraint</strong></p>
<p>ALTER TABLE table_name</p>
<p>MODIFY (column datatype [DEFAULT expr]</p>
<p>[CONSTRAINT constraint_name_nn] NOT NULL);</p>
<p><strong> </strong></p>
<p><strong>Dropping a Constraint</strong></p>
<p>ALTER TABLE table_name</p>
<p>DROP CONSTRAINT constraint_name;</p>
<p>ALTER TABLE table_name</p>
<p>DROP PRIMARY KEY | UNIQUE (column) |</p>
<p>CONSTRAINT constraint_name [CASCADE];</p>
<p><strong> </strong></p>
<p><strong>Disabling Constraints</strong></p>
<p>ALTER TABLE table_name</p>
<p>DISABLE CONSTRAINT constraint_name [CASCADE];</p>
<p><strong> </strong></p>
<p><strong>Enabling Constraints</strong></p>
<p>ALTER TABLE table_name</p>
<p>ENABLE CONSTRAINT constraint_name;</p>
<p><strong>NOTE:</strong></p>
<p><em>A UNIQUE or PRIMARY KEY index is automatically created if you enable a UNIQUE key or PRIMARY KEY constraint.</em></p>
<p><strong> </strong></p>
<p><strong>Data Dictionary</strong></p>
<p>ALL_CONSTRAINTS        USER_CONSTRAINTS</p>
<p>ALL_CONS_COLUMNS        USER_CONS_COLUMNS</p>
<p><strong> </strong></p>
<p><strong>View</strong></p>
<p><strong>Creating or Modifying a View</strong></p>
<p>CREATE [OR REPLACE] [FORCE|NOFORCE] VIEW view</p>
<p>[(alias[, alias]&#8230;)]</p>
<p>AS subquery</p>
<p>[WITH CHECK OPTION [CONSTRAINT constraint_name]]</p>
<p>[WITH READ ONLY [CONSTRAINT constraint_name]];</p>
<p><strong>Top-N Analysis</strong></p>
<p>SELECT [column_list], ROWNUM</p>
<p>FROM  (SELECT [column_list]</p>
<p>FROM table_name</p>
<p>ORDER BY Top-N_column)</p>
<p>WHERE ROWNUM &lt;= N;</p>
<p><em> </em></p>
<p><strong>Removing a View</strong></p>
<p>DROP VIEW view;</p>
<p><strong>SEQUENCE</strong></p>
<p><strong>CREATE SEQUENCE Statement</strong></p>
<p>CREATE SEQUENCE sequence</p>
<p>[INCREMENT BY n]</p>
<p>[START WITH n]</p>
<p>[{MAXVALUE n| NOMAXVALUE}]</p>
<p>[{MINVALUE n| NOMINVALUE}]</p>
<p>[{CYCLE | NOCYCLE}]</p>
<p>[{CACHE [n|20]| NOCACHE}];</p>
<p><strong> </strong></p>
<p><strong>Pseudocolumns</strong></p>
<p>sequence.NEXTVAL        sequence.CURRVAL</p>
<p><strong> </strong></p>
<p><strong>Modifying a Sequence (No START WITH option)</strong></p>
<p>ALTER SEQUENCE sequence</p>
<p>[INCREMENT BY n]</p>
<p>[{MAXVALUE n| NOMAXVALUE}]</p>
<p>[{MINVALUE n| NOMINVALUE}]</p>
<p>[{CYCLE | NOCYCLE}]</p>
<p>[{CACHE [n|20]| NOCACHE}];</p>
<p><strong> </strong></p>
<p><strong>Removing a Sequence</strong></p>
<p>DROP SEQUENCE sequence;</p>
<p><strong> </strong></p>
<p><strong>Index</strong></p>
<p><strong>Creating an Index</strong></p>
<p>CREATE INDEX index</p>
<p>ON TABLE (column[,column]&#8230;);</p>
<p><strong> </strong></p>
<p><strong>Removing an Index</strong></p>
<p>DROP INDEX index;</p>
<p><strong> </strong></p>
<p><strong>Synoym</strong></p>
<p>CREATE [PUBLIC] SYNONYM synonym</p>
<p>FOR object;</p>
<p><strong>Removing Synonyms</strong></p>
<p>DROP SYNONYM synonym;</p>
<p><strong> </strong></p>
<p><strong>Data Dictionary</strong></p>
<p>ALL_VIEWS                     USER_VIEWS</p>
<p>ALL_SEQUENCES                 USER_SEQUENCES</p>
<p>ALL_INDEXES                   USER_INDEXES</p>
<p>ALL_IND_COLUMNS               USER_IND_COLUMNS</p>
<p><strong> </strong></p>
<p><strong>System Privileges (DBA)       User System Privileges</strong></p>
<p>CREATE USER                   CREATE SESION</p>
<p>DROP USER                     CREATE TABLE</p>
<p>DROP ANY TABLE                CREATE SEQUENCE</p>
<p>BACKUP ANY TABLE              CREATE VIEW</p>
<p>CREATE PROCEDURE</p>
<p><strong>Creating Users</strong></p>
<p>CREATE USER user</p>
<p>IDENTIFIED BY password;</p>
<p><strong> </strong></p>
<p><strong>Creating Roles</strong></p>
<p>CREATE ROLE role;</p>
<p><strong>Granting System Privileges</strong></p>
<p>GRANT privelges[,...] TO user[,...];</p>
<p>GRANT privelges TO role;</p>
<p>GRANT role TO user[,...];</p>
<p><strong> </strong></p>
<p><strong>Changing Password</strong></p>
<p>ALTER USER user IDENTIFIED BY new_password;</p>
<p><strong> </strong></p>
<p><strong>Dropping Users</strong></p>
<p>DROP USER user [CASCADE];</p>
<p><strong> </strong></p>
<p><strong>Dropping Roles</strong></p>
<p>DROP ROLE role;</p>
<p><strong> </strong></p>
<p><strong>Object Privileges</strong></p>
<p>Object      Table       View        Sequence          Procedure</p>
<p>ALTER         X                        X</p>
<p>DELETE        X          X</p>
<p>EXECUTE                                                  X</p>
<p>INDEX         X</p>
<p>INSERT        X          X</p>
<p>REFERENCES   X</p>
<p>SELECT        X          X             X</p>
<p>UPDATE        X          X</p>
<p><strong> </strong></p>
<p><strong>Object Privileges</strong></p>
<p>GRAND object_priv [(column)]</p>
<p>ON object</p>
<p>TO {user|role|PUBLIC}</p>
<p>[WITH GRANT OPTION];</p>
<p><strong> </strong></p>
<p><strong>Revoking Object Privileges</strong></p>
<p>REVOKE {privilege [,privilege...] | ALL}</p>
<p>ON object</p>
<p>FROM {user[,user...]|role|PUBLIC}</p>
<p>[CASCADE CONSTRAINTS];</p>
<p><strong> </strong></p>
<p><strong>Data Dictionary</strong></p>
<p>ROLE_SYS_PRIVS</p>
<p>ROLE_TAB_PRIVS                USER_ROLE_PRIVS</p>
<p>USER_TAB_PRIVS_MADE           USER_TAB_PRIVS_RECD</p>
<p>USER_COL_PRIVS_MADE           USER_COL_PRIVS_RECD</p>
<p><strong> </strong></p>
<p><strong>Database Links</strong></p>
<p>CREATE [PUBLIC] DATABASE LINK link_name</p>
<p>[CONNECT TO user_name IDENTIFIED BY password]</p>
<p>USING connection_string;</p>
<p><strong> </strong></p>
<p><strong>Single-Row Functions</strong></p>
<p><strong>Character Functions</strong></p>
<p>LOWER(column|expression)</p>
<p>UPPER(column|expression)</p>
<p>INITCAP(column|expression)</p>
<p>INSTR(column|expression,m)</p>
<p>CONCAT(column1|expression1,column2|expression2}</p>
<p>SUBSTR(column|expression,m,[n])</p>
<p>LENGTH(column|expression)</p>
<p>LPAD(column|expression,n,&#8217;string&#8217;)</p>
<p>RPAD(column|expression,n,&#8217;string&#8217;)</p>
<p>TRIM(&#8216;character&#8217; FROM column|expression)</p>
<p>REPLACE(&#8217;string1&#8242;, &#8217;string_to_replace&#8217;,[replacement_string])</p>
<p><strong> </strong></p>
<p><strong>Number Functions</strong></p>
<p>MOD(m,n)</p>
<p>ROUND(column|expression,n)</p>
<p>TRUNC(column|expression,n)</p>
<p><strong> </strong></p>
<p><strong>Date Functions</strong></p>
<p>MONTHS_BETWEEN(date1,date2)</p>
<p>ADD_MONTHS(date,n)</p>
<p>NEXT_DAY(date,&#8217;char&#8217;)</p>
<p>LAST_DAY(date)</p>
<p>ROUND(date[,'fmt'])</p>
<p>TRUNC(date[,'fmt'])</p>
<p><em>Arithmetic with Dates</em></p>
<ul type="disc">
<li>Add or subtract a number to or from a date for a resultant date value</li>
<li>Subtract two dates to find the number of days between those dates</li>
<li>Add hours to a date by dividing the number of hours by 24</li>
</ul>
<p><strong> </strong></p>
<p><strong>Conversion Functions</strong></p>
<p>TO_CHAR(number|date[,'fmt'])</p>
<p>TO_NUMBER(char[,'fmt'])</p>
<p>TO_DATE(char[,'fmt'])</p>
<p>NVL(expr1,expr2)</p>
<p>NVL2(expr1,expr2,expr3)</p>
<p>NULLIF(expr1,expr2)</p>
<p>COALESCE(expr1,expr2,&#8230;,exprn)</p>
<p><strong>Conditional Expressions: </strong>Provide the use of IF-THEN-ELSE logic within a SQL statement.</p>
<p>DECODE(col|expr,search1,result1</p>
<p>[,search2,result2,...,]</p>
<p>[,default])</p>
<p>CASE expr WHEN comparision_expr1 THEN return_expr1</p>
<p>[WHEN comparision_expr2 THEN return_expr2</p>
<p>WHEN comparision_exprn THEN return_exprn</p>
<p>ELSE else_expr]</p>
<p>END</p>
<p><em>Nesting Functions</em></p>
<ul>
<li>Single-row functions can be nested to any level</li>
<li>Nested functions are evaluated from deepest level to the least deep level</li>
<li>In below example, functions F1, F2 and then F3 gets executed</li>
</ul>
<p>F3(F2(F1(col,arg1),arg2),arg3)</p>
<p><strong>Operators</strong></p>
<p>Arithmetic        *     /     +     -</p>
<p>Comparison        =     &gt;     &gt;=    &lt;     &lt;=    &lt;&gt; or ^= or ~= or !=</p>
<p>BETWEEN&#8230;AND&#8230;, IN(set), LIKE, IS NULL</p>
<p>Concatenation     ||</p>
<p>Logical           AND   OR    NOT</p>
<p><strong>Rules of Precedence</strong></p>
<p>Order Evaluated         Operator</p>
<ul>
<li>1 Arithmetic operators &#8211; multiplication and division(* /)</li>
<li>2 Arithmetic operators &#8211; Addition, subtraction and Concatenation operator ( + &#8211; || )</li>
<li>3 Comparison conditions</li>
<li>4 IS [NOT] NULL, LIKE, [NOT] IN</li>
<li>5 [NOT] BETWEEN</li>
<li>6 NOT logical condition; ** Exponentiation</li>
<li>7 AND logical condition</li>
<li>8 OR logical condition</li>
</ul>
<p><strong>Notes</strong></p>
<ul>
<li>1) Use <strong>ESCAPE</strong> identifier to search for the actual % and _ symbols (Here, % denotes zero or many characters and _ denotes one character in search condition )</li>
</ul>
<p>Example: Get employee list having underscore (_) in last_name string</p>
<p>SELECT last_name</p>
<p>FROM EMPLOYEE</p>
<p>WHERE last_name LIKE &#8216;%\_%&#8217; ESCAPE &#8216;\&#8217;;</p>
<ul>
<li>2) <strong>DUAL</strong> is a dummy table you can use to view results from functions and calculations</li>
<li>3) <strong>SYSDATE</strong> is a function that returns: Date and Time</li>
<li>4) Inline view is a subquery with an alias that you can use within a SQL statement. A named subquery in the FROM clause of the main query is an example of an inline view. It is not a schema object.</li>
</ul>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.oratraining.com%2Fblog%2F2009%2F06%2Fsq-quick-referenence%2F&amp;linkname=Oracle%20SQL%20Quick%20reference"><img src="http://www.oratraining.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.oratraining.com/blog/2009/06/sq-quick-referenence/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Oracle SQL tuning tips</title>
		<link>http://www.oratraining.com/blog/2009/06/oracle-sql-tuning-tips/</link>
		<comments>http://www.oratraining.com/blog/2009/06/oracle-sql-tuning-tips/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 05:21:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Database Performance Tuning]]></category>
		<category><![CDATA[Database programming]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle DBA]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Oracle PL/SQL]]></category>
		<category><![CDATA[Oracle developers]]></category>

		<guid isPermaLink="false">http://www.oratraining.com/blog/?p=176</guid>
		<description><![CDATA[Oracle SQL Tuning Tips
consideration when writing an SQL statement is that it returns a correct result. The second is that it be the most efficient for a given situation.  You can use many different SQL statements to achieve the same result. It is often the case that only one statement will be the most efficient [...]]]></description>
			<content:encoded><![CDATA[<h2>Oracle SQL Tuning Tips</h2>
<p>consideration when writing an SQL statement is that it returns a correct result. The second is that it be the most efficient for a given situation.  You can use many different SQL statements to achieve the same result. It is often the case that only one statement will be the most efficient choice in a given situation.</p>
<p>Remember that processing SQL is a sequence of Parse (syntax check and object resolution), Execution (required reads and writes), and Fetch (row results retrieved, listed, sorted, and returned). SQL &#8220;tuning&#8221; consists, quite simply, of reducing one or more of them.</p>
<p>Note: generally Parse is the greatest time and resource hog. Parse overhead can be minimized by the use of Procedures, Functions, Packages, Views, etc.</p>
<p>Inadequate performance can have a significant cost impact on your business. A poor performing system and application can result in customer dissatisfaction, reduced productivity, and high costs. It is absolutely critical that the system&#8217;s performance is operating at its peak levels.</p>
<p>Following are some general tips that often increase SQL statement efficiency. Being general they may not apply to a particular scenario.<span id="more-176"></span></p>
<ul>
<li>Tuning SQL should only be done after your code is working correctly. Be aware that there is an inevitable tug-of-war between writing efficient SQL and understandable SQL.</li>
<li>Ensure repeated SQL statements are written<em>absolutely identically</em>to facilitate efficient reuse: re-parsing can often be avoided for each subsequent use of an identical statement.<br />
Writing best practices: all SQL verbs in upper-case i.e. SELECT; separate all words with a single space; all SQL verbs begin on a new line; SQL verbs aligned right or left within the initial verb; set and maintain a table alias standard; use table aliases and when a query involves more than one table prefix all column names with their aliases. Whatever you do, be consistent.</li>
<li>o Use bind variables: The values of bind variables do not need to be the same for two statements to be considered identical. Bind variables are not substituted until a statement has been successfully parsed.</li>
<li>o Use standard approach to table aliases. If two identical SQL statements vary because an identical table has two different aliases, then the SQL is different and will not be re-use or shared.</li>
<li>o Use table aliases and prefix all column names by their aliases when more than one table is involved in a query. This reduces parse time and prevents future syntax errors if someone adds a column to one of the tables with same name as a column in another table. (ORA-00918: COLUMN AMBIGUOUSLY DEFINED)</li>
<li>Code the query as simply as possible i.e. no unnecessary columns are selected, no unnecessary GROUP BY or ORDER BY.<br />
It is the same or faster to SELECT by actual column name(s). The larger the table the more likely the savings.<br />
<em>Use:</em><br />
<em>SELECT customer_id, last_name, first_name, street, city FROM customer;<br />
Rather than, </em><em><br />
SELECT * FROM customer;</em></li>
<li>Beware of WHERE clauses which do not use indexes at all. Even if there is an index over a column that is referenced by a WHERE clause included in this section, Oracle will ignore the index. All these WHERE clause can be re-written to use an index while returning the same values. In other words, Do not perform operations on database objects referenced in the WHERE clause:<br />
<em>Use:<br />
</em><em>SELECT client, date, amount FROM sales WHERE amount <strong>&gt; 0;</strong></em><em><br />
Rather than:<br />
</em><em>SELECT client, date, amount FROM sales WHERE amount <strong>!= 0;<br />
</strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Use:<br />
SELECT account_name, trans_date, amount FROM transaction WHERE account_name <strong>LIKE &#8216;CAPITAL%&#8217;;</strong><br />
</em><em>Rather than:</em><em><br />
SELECT account_name, trans_date, amount FROM transaction WHERE <strong>SUBSTR(account_name,1,7)=</strong>&#8216;CAPITAL&#8217;;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Use:<br />
SELECT account_name, trans_date, amount FROM transaction WHERE amount <strong>&gt; 0;<br />
</strong></em><em>Rather than:<br />
</em><em>SELECT account_name, trans_date, amount FROM transaction WHERE amount <strong>NOT=0;<br />
</strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<strong><br />
</strong>Use:<br />
SELECT account_name, trans_date, amount FROM transaction WHERE<strong> amount &lt; 2000;<br />
</strong>Rather than:<br />
SELECT account_name, trans_date, amount FROM transaction WHERE <strong>amount + 3000 </strong>&lt; 5000;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Use:<br />
SELECT account_name, trans_date, amount FROM transaction WHERE <strong>account_name = &#8216;AMEX&#8217; AND account_type = &#8216;A&#8217;;<br />
</strong>Rather than:<br />
SELECT account_name, trans_date, amount FROM transaction WHERE <strong>account_name|| account_type=</strong>&#8216;AMEXA&#8217;; </em></li>
<li>Don&#8217;t forget to tune views. Views are SELECT statements and can be tuned in just the same way as any other type of SLECT statement can be. All tuning applicable to any SQL statement are equally applicable to views.</li>
<li>Avoid including a HAVING clause in SELECT statements. The HAVING clause filters selected rows only after all rows have been fetched. Using a WHERE clause helps reduce overheads in sorting, summing, etc. HAVING clauses should only be used when columns with summary operations applied to them are restricted by the clause.<br />
<em>Use:</em><br />
<em>SELECT city FROM country <strong>WHERE</strong> city!= &#8216;Vancouver&#8217; AND city!= &#8216;Toronto&#8217;; GROUP BY city;</em><em><br />
Rather than:<br />
</em><em>SELECT city FROM country GROUP BY city <strong>HAVING</strong> city!= &#8216;Vancouver&#8217; AND city!= &#8216;Toronto&#8217;;</em></li>
<li>Minimize the number of table lookups (subquery blocks) in queries, particularly if our statements include subquery SELECTs or multicolumn UPDATEs.<br />
<em>Use:<br />
SELECT emp_name FROM emp WHERE <strong>(emp_cat, sal_range</strong>) = (<strong>SELECT</strong> MAX(category), MAX(sal_range) FROM emp_categories) AND emp_dept = 0020;<br />
Rather than:<br />
SELECT emp_name FROM emp WHERE <strong>emp_cat</strong>=(<strong>SELECT</strong> MAX(category) FROM emp_categories) AND <strong>emp_range</strong> = (<strong>SELECT</strong> MAX(sal_range) FROM emp_categories) AND emp_dept = 0020;</em></li>
<li>When writing a sub-query (a SELECT statement within the WHERE or HAVING clause of another SQL statement):</li>
<li>o Use a correlated (refers to at least one value from the outer query) sub-query when the return is relatively small and/or other criteria are efficient i.e. if the tables within the sub-query have efficient indexes.</li>
<li>o Use a non-correlated (does not refer to the outer query) sub-query when dealing with large tables from which you expect a large return (many rows) and/or if the tables within the sub-query do not have efficient indexes.</li>
<li>o Ensure that multiple sub-queries are in the most efficient order.</li>
<li>o Remember that rewriting a sub-query as a join can sometimes increase efficiency.</li>
<li>When doing multiple table joins consider the benefits/costs for each of EXISTS, IN, and table joins. Depending on your data one or another may be faster.<br />
Note: IN is usually the slowest.<br />
Note: When most of the filter criteria are in the sub-query IN may be more efficient; when most of the filter criteria are in the parent-query EXISTS may be more efficient.<em><br />
The following queries return the employee names from each department in department category &#8216;A&#8217;:</em><br />
<em>SELECT emp_name FROM emp E WHERE <strong>EXISTS </strong>(SELECT &#8216;X&#8217; FROM dept WHERE dept_no = E.dept_no AND dept_cat = &#8216;A&#8217;);</em><br />
<em>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</em><em><br />
SELECT emp_name FROM emp E WHERE dept_no <strong>IN </strong>(SELECT dept_no FROM dept WHERE dept_no = E.dept_no AND dept_Cat = &#8216;A&#8217;);<br />
</em><em>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</em><em><br />
SELECT emp_name FROM dept D, emp E WHERE E.dept_no = D.dept_no AND D.dept_cat = &#8216;A&#8217;;</em></li>
<li>Where possible use EXISTS rather than DISTINCT, to avoid full table scan as DISTINCT operator causes Oracle to fetch all rows satisfying the table join and then sort and filter out duplicate values. EXISTS is a faster alternative, because the Oracle optimizer realizes when the subquery has been satisfied once, there is no need to proceed further and the next matching row can be fetched.<br />
<em>Use:<br />
SELECT S.id, S.description FROM small_table S WHERE <strong>EXISTS </strong>(SELECT NULL FROM big_table B WHERE B.id = S.id);<br />
Rather than:<br />
SELECT <strong>DISTINCT S.id, S.description</strong> FROM small_table S, big_table B<br />
WHERE S.id = B.id;</em></li>
<li>Where possible use a non-column expression (putting the column on one side of the operator and all the other values on the other). Non-column expressions are often processed earlier thereby speeding the query.<br />
<em>Use:<br />
</em><em>WHERE SALES &lt; 1000/(1 + n);</em><em><br />
Rather than:<br />
</em><em>WHERE SALES + (n * SALES) &lt; 1000;</em></li>
<li>Where possible use UNION ALL rather than using UNION. The UNION clause forces all rows retuned by each portion of the UNION to be sorted and merged and duplicates to be filtered out before the first row is returned. A UNION ALL simply returns all rows including duplicates and does not have to perform any sort, merge or filter. If your tables are mutually exclusive(include no duplicate records), or you don&#8217;t care if duplicates are returned, the UNION ALL is much more efficient.<br />
<em>USE:</em><br />
<em>SELECT acct_num, balance_amt FROM debit_transactions WHERE tran_date = &#8216;31-DEC-95&#8242;<br />
<strong>UNION ALL</strong><br />
SELECT acct_num, balance_amt FROM credit_transactions WHERE tran_date = &#8216;31-DE -95&#8242;;<br />
Rather than:<br />
SELECT acct_num, balance_amt FROM debit_transactions WHERE tran_date = &#8216;31-DEC-95&#8242;<br />
<strong>UNION</strong><br />
SELECT acct_num, balance_amt FROM credit_transactions WHERE tran_date = &#8216;31-DE -95&#8242;;</em></li>
<li>Consider using DECODE to avoid having to scan the same rows repetitively or join the same table repetitively. Note, DECODE is not necessarily faster as it depends on your data and the complexity of the resulting query. Also, using DECODE requires you t change your code when new values are allowed in the field.<br />
<em>USE:<br />
SELECT COUNT(<strong>DECODE</strong>(status,&#8217;Y',&#8217;X',NULL)) Y_count,<br />
COUNT(<strong>DECODE</strong>(status,&#8217;N',&#8217;X',NULL)) N_count<br />
FROM emp WHERE emp_name LIKE &#8216;SMITH%&#8217;;<br />
Raher than:<br />
SELECT COUNT(*) FROM emp WHERE status = &#8216;Y&#8217; AND emp_name LIKE &#8216;SMITH%&#8217;;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
SELECT COUNT(*) FROM emp WHERE status = &#8216;N&#8217; AND emp_name LIKE &#8216;SMITH%&#8217;;</em></li>
<li>Oracle automatically performs simple column type conversions(or casting) when it compares columns of different types. Depending on the type of conversion, indexes may not be used. Make sure you declare your program variables as the same type as your Oracle columns, if the type is supported in the programming language you are using.<br />
<em>Use:<br />
SELECT emp_no, emp_name, sal FROM emp WHERE emp_no = &#8216;123&#8242;;<br />
HERE if emp_no indexed numeric, then after implicit conversion query will be:<br />
SELECT emp_no, emp_name, sal FROM emp WHERE emp_no = <strong>TO_NUMBER</strong>(&#8216;123&#8242;); </em><br />
<em>Thus, index is used in this case.<br />
Don&#8217;t use:<br />
SELECT emp_no, emp_name, sal FROM emp WHERE emp_type = 123;<br />
HERE if emp_type is indexed varchar2, then after implicit conversion query will be:</em><br />
<em>SELECT emp_no, emp_name, sal FROM emp WHERE TO_NUMBER(emp_type) = 123;</em><br />
<em>Thus, index will not be used in this case.</em></li>
<li>The most efficient method for storing large binary objects, i.e. multimedia objects, is to place them in the file system and place a pointer in the DB.</li>
<li>B-Tree Indexes do not store entries for NULL, so IS NULL is not indexable, but IS NOT NULL is indexable and thus if a huge table contains very few not null values then you should go for B-Tree indexes. On the other hand bitmap indexes support IS NULL condition.<br />
<em>SELECT * FROM big WHERE status IS NOT NULL; (Use B-tree index in this case)</em></li>
<li>Avoid using functions on indexed columns unless a function-based index is created; as it leads to full table scan even though index exists on the column.</li>
</ul>
<p><strong>Avoid using the following:</strong></p>
<ul type="disc">
<li>Boolean operators &gt;, &lt;, &gt;=, &lt;=, IS NULL, IS NOT NULL</li>
<li>NOT IN, !=</li>
<li>Like &#8216;%pattern&#8217;, not exists</li>
<li>Calculations on unindexed columns or (use union instead)</li>
<li>Having (use a WHERE clause instead when appropriate)</li>
</ul>
<p><strong> </strong><strong>Do use the following:</strong></p>
<ul type="disc">
<li>Enable aliases to prefix all columns</li>
<li>Place indexed columns higher in the WHERE clause</li>
<li>Use SQL Joins instead of using sub-queries</li>
<li>Make the table with the least number of rows, the driving table, by making it first in the FROM clause</li>
</ul>
<p><strong>Other important points for SQL Tuning</strong></p>
<ul type="disc">
<li>Establish a tuning environment that reflects your production database</li>
<li>Establish performance expectations before you begin</li>
<li>Always Design and develop with performance in mind</li>
<li>Create Indexes to support selective WHERE clauses and join conditions</li>
<li>Use concatenated indexes where appropriate</li>
<li>Consider indexing more than you think you should, to avoid table lookups</li>
<li>Pick the best join method</li>
<li>Nested loops joins are best for indexed joins of subsets</li>
<li>Hash joins are usually the best choice for &#8220;big&#8221; joins</li>
<li>Pick the best join order</li>
<li>Pick the best &#8220;driving&#8221; table</li>
<li>Eliminate rows as early as possible in the join order</li>
<li>Use bind variables. Bind variables are key to application scalability</li>
<li>Use Oracle hints where appropriate</li>
<li>Compare performance between alternative syntax for your SQL statement</li>
<li>Consider utilizing PL/SQL to overcome difficult SQL tuning issues</li>
<li>Consider using third party tools to make the job of SQL tuning easier</li>
</ul>
<p>Performing these steps is easy and provides a tremendous benefit and performance boost. Follow these simple steps and you can increase your system performance.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.oratraining.com%2Fblog%2F2009%2F06%2Foracle-sql-tuning-tips%2F&amp;linkname=Oracle%20SQL%20tuning%20tips"><img src="http://www.oratraining.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.oratraining.com/blog/2009/06/oracle-sql-tuning-tips/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SQL*Plus Basic commands</title>
		<link>http://www.oratraining.com/blog/2009/06/sqlplus-basic-commands/</link>
		<comments>http://www.oratraining.com/blog/2009/06/sqlplus-basic-commands/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 05:18:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Database programming]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle DBA]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Oracle PL/SQL]]></category>
		<category><![CDATA[Oracle developers]]></category>

		<guid isPermaLink="false">http://www.oratraining.com/blog/?p=174</guid>
		<description><![CDATA[Using SQL*Plus
SQL*Plus is a command-line tool that provides access to the Oracle RDBMS.
SQL*Plus enables you to:

Enter SQL*Plus commands to configure the SQL*Plus environment
Startup and shutdown an Oracle database
Connect to an Oracle database
Enter and execute SQL commands and PL/SQL blocks
Format and print query results

SQL*Plus is available on several platforms. In addition, it has a web-based user
interface, [...]]]></description>
			<content:encoded><![CDATA[<h2>Using SQL*Plus</h2>
<p>SQL*Plus is a command-line tool that provides access to the Oracle RDBMS.</p>
<p>SQL*Plus enables you to:</p>
<ul type="disc">
<li>Enter SQL*Plus commands to configure the SQL*Plus environment</li>
<li>Startup and shutdown an Oracle database</li>
<li>Connect to an Oracle database</li>
<li>Enter and execute SQL commands and PL/SQL blocks</li>
<li>Format and print query results</li>
</ul>
<p>SQL*Plus is available on several platforms. In addition, it has a web-based user</p>
<p>interface, <em>i</em>SQL*Plus.</p>
<p>SQL*Plus is a client terminal software allowing users to interact with Oracle server to manipulate data and data structures. Users type in SQL statements in SQL*Plus that send statements to Oracle server. Oracle server then validates and executes the statements on its databases. The query results are returned to SQL*Plus and displayed to the user.  Besides sending SQL statements to the server, SQL*Plus also saves them into a local buffer and allow users to view and change the statements. The following figure illustrates the process.<span id="more-174"></span></p>
<p>After you login into SQL*Plus, at the SQL prompt, you can begin typing any SQL command. Upon hitting return (i.e., enter key) the SQL prompt will change to line number prompts. When you are finished typing a command, type / or RUN to execute the SQL command. Also, a semicolon at the end of the SQL command will execute the command immediately after hitting return. In addition to SQL commands, /, and RUN, you can also executes SQL*Plus file commands.</p>
<p><strong>SQL*PLUS Commands Quick Reference</strong></p>
<p>Below table shows, SQL*Plus commands available in the command-line interface. Not all commands or command parameters are shown.</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="175" valign="top"><strong>How to &#8230;</strong></td>
<td width="415" valign="top"><strong>SQL*Plus Command</strong></td>
</tr>
<tr>
<td width="175" valign="top">Log in to SQL*Plus</td>
<td width="415" valign="top">SQLPLUS [ { username[/passward][@connect_identifier] | / }  [ AS { SYSDBA | SYSOPER } ] | /NOLOG ]</td>
</tr>
<tr>
<td width="175" valign="top">List help topics available in SQL*Plus</td>
<td width="415" valign="top">HELP [ INDEX | topic ]</td>
</tr>
<tr>
<td width="175" valign="top">Execute host commands</td>
<td width="415" valign="top">HOST [ command ]</td>
</tr>
<tr>
<td width="175" valign="top">Show SQL*Plus system variables or environment settings</td>
<td width="415" valign="top">SHOW { ALL | ERRORS | USER | system_variable | &#8230; }</td>
</tr>
<tr>
<td width="175" valign="top">Alter SQL*Plus system variables or environment settings</td>
<td width="415" valign="top">SET system_variable value</td>
</tr>
<tr>
<td width="175" valign="top">Start up a database</td>
<td width="415" valign="top">STARTUP PFILE = filename  [ MOUNT [ dbname ] | NOMOUNT | &#8230; ]</td>
</tr>
<tr>
<td width="175" valign="top">Connect to a database</td>
<td width="415" valign="top">CONNECT [ [ username [ /password ] [ @connect_identifier ]          [ / AS { SYSOPER | SYSDBA } ]</p>
<p>]</td>
</tr>
<tr>
<td width="175" valign="top">List column definitions for a table, view, or synonym, or specifications for afunction or procedure</td>
<td width="415" valign="top">DESCRIBE [ schema. ] object</td>
</tr>
<tr>
<td width="175" valign="top">Edit contents of the SQL buffer or a file</td>
<td width="415" valign="top">EDIT [ filename [ .ext ] ]</td>
</tr>
<tr>
<td width="175" valign="top">Get a file and load its contents into the SQLBuffer</td>
<td width="415" valign="top">GET filename [ .ext ] [ LIST | NOLLIST ]</td>
</tr>
<tr>
<td width="175" valign="top">Save contents of the SQL buffer to a file</td>
<td width="415" valign="top">SAVE filename [ .ext ] [ CREATE | REPLACE | APPEND ]</td>
</tr>
<tr>
<td width="175" valign="top">List contents of the SQL Buffer</td>
<td width="415" valign="top">LIST [ n | nm | n LAST | ... ]</td>
</tr>
<tr>
<td width="175" valign="top">Delete contents of the SQL Buffer</td>
<td width="415" valign="top">DEL [ n | nm | n LAST | ... ]</td>
</tr>
<tr>
<td width="175" valign="top">Add new lines following current line in the SQL buffer</td>
<td width="415" valign="top">INPUT [ text ]</td>
</tr>
<tr>
<td width="175" valign="top">Append text to end ofcurrent line in the SQL</p>
<p>buffer</td>
<td width="415" valign="top">APPEND text</td>
</tr>
<tr>
<td width="175" valign="top">Find and replace first occurrence of a text string in current line of the SQL buffer</td>
<td width="415" valign="top">CHANGE sepchar old [ sepchar [ new [ sepchar ] ] ]sepchar can be any non-alphanumeric character such as &#8220;/&#8221; or &#8220;!&#8221;</td>
</tr>
<tr>
<td width="175" valign="top">Capture query results in a file and, optionally, send contents of file to default printer</td>
<td width="415" valign="top">SPOOL [ filename [ .ext ]  [ CREATE | REPLACE | APPEND | OFF | OUT ]</td>
</tr>
<tr>
<td width="175" valign="top">Run SQL*Plus statements stored in a file</td>
<td width="415" valign="top">@ { url | filename [ .ext ] } [ arg... ]START filename [ .ext ] [ arg... ]</p>
<p>.ext can be omitted if the filename extension is .sql</td>
</tr>
<tr>
<td width="175" valign="top">Execute commands stored in the SQL buffer</td>
<td width="415" valign="top">/</td>
</tr>
<tr>
<td width="175" valign="top">List and execute commands stored in the SQL buffer</td>
<td width="415" valign="top">RUN</td>
</tr>
<tr>
<td width="175" valign="top">Execute a single PL/SQL statement or run a stored procedure</td>
<td width="415" valign="top">EXECUTE statement</td>
</tr>
<tr>
<td width="175" valign="top">Disconnect from a database</td>
<td width="415" valign="top">DISCONNECT</td>
</tr>
<tr>
<td width="175" valign="top">Shut down a database</td>
<td width="415" valign="top">SHUTDOWN [ ABORT | IMMEDIATE | NORMAL | ... ]</td>
</tr>
<tr>
<td width="175" valign="top">Log out of SQL*Plus</td>
<td width="415" valign="top">{ EXIT | QUIT }  [ SUCCESS | FAILURE | WARNING | ... ]</p>
<p>[ COMMIT | ROLLBACK ]</td>
</tr>
</tbody>
</table>
<p><a name="SQL*Plus_file_commands"></a></p>
<p>SQL*Plus file command allow you to execute commands (or programs) stored in an external file, input or output data from/to a file, and save SQL commands typed during current session.</p>
<p>Some SQL*Plus file commands are:</p>
<ul type="disc">
<li>SAVE filename. This allows you to save buffer contents into a file.</li>
<li>START filename. This allows you to execute a batch of SQL statements stored in a file.</li>
<li>SPOOL filename. This allows you save SQL statements together with their outputs to a file.</li>
<li> GET filename. This retrieve a file and places it into the buffer.</li>
<li>@ filename. This allows you to execute a PL/SQL procedure(s) stored in a file.</li>
</ul>
<h2><a name="SQL*Plus_edit_commands"></a></h2>
<p>Recall that the previously executed commands (in current SQL*Plus session) are stored in the local buffer. One way to change an SQL statement in the buffer is by using the<em> <strong>line editor</strong></em>. The following are a list of line edit commands.</p>
<ul type="disc">
<li>LIST or L&#8211;Lists the contents of the buffer</li>
<li>LIST n or L n&#8211;Lists the contents of line number n in the buffer and makes the line current</li>
<li>LIST * or L *&#8211;Lists the current line</li>
<li>LIST m n&#8211;Lists the range from m to n line</li>
<li>Append text or A text&#8211;Adds to the end of the current line (e.g., &#8220;A ,&#8221; adds a comma to the end of line</li>
<li>INPUT or I&#8211;Adds one or more lines after the current line so you can begin adding the text.</li>
<li>CHANGE /text&#8211;Deletes text from the current line</li>
<li>CHANGE /oldtext/newtext&#8211;Replaces oldtext with newtext in the current line</li>
<li>DEL &#8212; Deletes the current line</li>
</ul>
<p>Besides line editor, you can also use the <em>vi editor</em> if you are a fan of Unix editor!.</p>
<p>To invoke the vi editor, type Edit at the SQL Prompt.   Multiple SQL commands can be typed in vi editor. End each SQL command (except the last one) with a semicolon. After exiting notepad, type Start to run all of the commands.</p>
<h2><a name="run_batch_sql"></a>Run SQL statements in a batch</h2>
<p>To run SQL commands in a batch, you can put all your SQL commands into a text file and execute these commands in this file in SQL*PLUS.</p>
<ul type="disc">
<li>Use your favorite editor to type in your SQL queries into a text file.</li>
</ul>
<p>For Example,</p>
<p>$ more table.sql<br />
DROP TABLE employee<br />
/</p>
<p>commit<br />
/</p>
<p>CREATE TABLE employee (<br />
empno INTEGER NOT NULL,<br />
name VARCHAR2(50) NOT NULL,<br />
sal REAL NOT NULL,<br />
primary key (empno));<br />
/</p>
<p>INSERT INTO employee VALUES (1, &#8216;Jack&#8217;, 6000);<br />
INSERT INTO employee VALUES (2, &#8216;Tom&#8217;,  6000);<br />
INSERT INTO employee VALUES (3, &#8216;John&#8217;, 6000);<br />
INSERT INTO employee VALUES (4, &#8216;Jane&#8217;, 6000);<br />
/</p>
<p>UPDATE employee SET sal=500 WHERE name=&#8217;Jack&#8217;<br />
/</p>
<p>CREATE INDEX test_index on employee(sal)<br />
/<br />
$</p>
<ul type="disc">
<li>Connect into SQL*Plus, and run the batch of commands. For example, assume that you name the SQL file as <em>table.sql</em>.</li>
</ul>
<p><tt>SQL&gt; START table.sql</tt>;</p>
<h2><a name="output_to_file"></a>Output results <a name="Output"></a></h2>
<ul type="disc">
<li>You can record your SQL command outputs to a file for output or editing purpose.</li>
</ul>
<p>SQL&gt; <tt>SPOOL </tt>&lt;your file name&gt;</p>
<p>For example,</p>
<p><tt>SQL&gt; SPOOL myoutput.out</tt></p>
<p>All SQL commands and their outputs after this command are written into the file <tt>myoutput.out </tt>that by default is stored in the current working directory where you invoked SQL*Plus.</p>
<ul type="disc">
<li>To end recording, use the following command: <tt> </tt></li>
</ul>
<p><tt>SQL&gt; SPOOL OFF</tt></p>
<h2><a name="dual"></a>DUAL and select the current time</h2>
<p>DUAL is the dummy table, mostly used to view the results from functions and calculations. The built-in function <tt>SYSDATE</tt> returns a <tt>DATE</tt> value containing the current date and time on your system. (Note Oracle is a client-server architecture and SQL*Plus is the client. SYSDATE gives you the time of the Unix system which you telnet in. It may NOT be the time of Oracle server unless you telnet into the machine running Oracle server.)</p>
<p>For example,</p>
<pre>SQL&gt; SELECT TO_CHAR(<tt>SYSDATE</tt> , 'Dy DD-Mon-YYYY HH24:MI:SS') as "Current Date/Time" FROM DUAL;;</pre>
<p>Result:</p>
<pre>Current Time</pre>
<pre>------------------------------------------------------------------------</pre>
<pre>Mon 15-July-2002 10:01:29</pre>
<ul type="disc">
<li>TO_CHAR is a function to format a value.</li>
<li><tt>DUAL</tt> is built-in relation in Oracle which serves as a dummy relation to put in the <tt>FROM</tt> clause when nothing else is appropriate. For example, try &#8220;SELECT 2+2 FROM DUAL;&#8221;</li>
<li>To format a number attribute to a dollar format, use the <em>column &lt;attribute&gt; format &lt;format&gt;</em>:</li>
</ul>
<pre>       SQL&gt; COLUMN salary FORMAT $999,999</pre>
<ul type="disc">
<li>To indicate the displayed width of a character string attribute, use the <em>column &lt;attribute&gt; format &lt;A&#8217;format&gt;</em>. For example, set the width of the name attribute to 8 characters.</li>
</ul>
<pre>       SQL&gt; COLUMN name FORMAT A8</pre>
<p>If a name is longer than 8 characters, the remaining is displayed at the second line (or several lines)</p>
<ul type="disc">
<li>The <em>set</em> command can be used to change the default number of lines per page (14) and the number of characters per line (80).</li>
</ul>
<p>For example, to set the number of lines per page to 60, use the following command:</p>
<pre>   SQL&gt; SET PAGESIZE 60</pre>
<ul type="disc">
<li>All formatting remain active until they are cleared or reset or after you exit from SQL*Plus.</li>
</ul>
<pre>   SQL&gt; CLEAR COLUMN</pre>
<ul type="disc">
<li>If you forget a specific SQL command you could enter</li>
</ul>
<p><tt> SQL&gt; HELP &lt;the SQL command&gt;;</tt></p>
<p>You could also find out all commands by entering:</p>
<p><tt> SQL&gt; HELP menu;</tt></p>
<ul type="disc">
<li>Sometimes when you get something fuzzy, you  can try the following</li>
</ul>
<p>SQL&gt; SET SERVEROUTPUT ON<br />
SQL&gt; SET ARRAYSIZE 1</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.oratraining.com%2Fblog%2F2009%2F06%2Fsqlplus-basic-commands%2F&amp;linkname=SQL%2APlus%20Basic%20commands"><img src="http://www.oratraining.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.oratraining.com/blog/2009/06/sqlplus-basic-commands/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Oracle Export and Import utility tutorial</title>
		<link>http://www.oratraining.com/blog/2009/06/oracle-export-and-import-utility-tutorial/</link>
		<comments>http://www.oratraining.com/blog/2009/06/oracle-export-and-import-utility-tutorial/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 12:57:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Database Performance Tuning]]></category>
		<category><![CDATA[Database programming]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle DBA]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Oracle developers]]></category>

		<guid isPermaLink="false">http://www.oratraining.com/blog/?p=169</guid>
		<description><![CDATA[Oracle Data Export and Import utility
The Import and Export utilities work together; Export sends database definitions and actual data to an export file and Import can read the file to perform many different tasks. You can use Export and Import for many important database tasks, such as restoring a table, generating CREATE scripts, copying data [...]]]></description>
			<content:encoded><![CDATA[<h2>Oracle Data Export and Import utility</h2>
<p>The Import and Export utilities work together; Export sends database definitions and actual data to an export file and Import can read the file to perform many different tasks. You can use Export and Import for many important database tasks, such as restoring a table, generating CREATE scripts, copying data among Oracle databases, migrating among Oracle versions, and moving tables from one schema to another.</p>
<p>Oracle&#8217;s export (exp) and import (imp) utilities are used to perform logical database backup and recovery. When exporting, database objects are dumped to a binary file which can then be imported into another Oracle database.</p>
<p>These utilities can be used to move data between different machines, databases or schema. However, as they use a proprietary binary file format, they can only be used between Oracle databases. One cannot export data and expect to import it into a non-Oracle database.</p>
<p>Various parameters are available to control what objects are exported or imported. To get a list of available parameters, run the <em>exp</em> or <em>imp</em> utilities with the <em>help=yes</em> parameter i.e. &#8220;<em>exp help=yes</em>&#8221; or &#8220;<em>imp help=yes</em>&#8220;.</p>
<p>The export/import utilities are commonly used to perform the following tasks:<span id="more-169"></span></p>
<ul>
<li><strong><em>Back up and recover objects</em></strong><strong>.</strong> Perhaps the most widely used Export and Import feature is the capability to serve as a useful backup solution. Most Oracle installations use full online or hot backups to back up the entire database in the event of a CPU, network, or disk failure. This works well because all data can be restored to the very millisecond that the database crashed. However, Export and Import provide for extra safety. If just one table in the entire database needs to be recovered during a full backup, the entire database would have to be recovered on another machine, and the one table would be copied back over into the original database. This incredibly time- and resource-consuming task could become a real headache in distributed databases. Export and Import can save you this trouble by exporting the entire database and importing just the tables that need to be recovered. Now that point-in-time recovery is an option for <em>tablespaces </em>in Oracle8, Export and Import can also serve as a backup and recovery mechanism for the entire database.</li>
<li><strong><em>Copy objects among schemas</em></strong><strong>.</strong> You can use Export and Import to copy all object types such as tables, indexes, grants, procedures, and views from one schema to another. You can specify which objects you want to move, and provide the FROM and TO schemas. Oracle does the rest automatically.</li>
<li><strong><em>Copy objects among Oracle databases</em></strong><strong>.</strong> You can export a table in one Oracle database and import that table into another. Many businesses export key tables and send the export files to a remote office location, which can then use Import to load the data into its local database. This is a form of one-way data replication to remote locations.</li>
<li><strong><em>Generate </em></strong><strong><em>CREATE</em></strong><strong><em> scripts</em></strong>. Export and Import contain powerful options that allow you to generate CREATE scripts for tables, partitions, indexes, object-type definitions, views, grants, constraints, rollback segments, tablespaces, and all other objects in the database. This safeguards the structure of your objects, in case one gets corrupted or deleted.</li>
<li><strong><em>Migrate databases from one Oracle version to another</em></strong>. You can upgrade (or downgrade) the version of Oracle by using the Export and Import utilities. For example, you can export an Oracle7 database, copy the export file to an Oracle8 database server, and then import into the Oracle8 server. This process, called <em>migration</em>, makes the data and application function in an Oracle8 environment. Of course, we always recommend complete testing before relying on the results of a migration.</li>
<li><strong><em>Defragment a tablespace</em></strong>. Fragmentation occurs when tables and indexes are created, dropped, enlarged, and reduced in size over time. Fragmentation also occurs when an object&#8217;s <em>storage parameters </em>are sized improperly. To defragment a tablespace, you can export a tablespace, coalesce the free space (or drop and recreate the tablespace), and import the objects again.</li>
</ul>
<p>Because of the special binary format, files which had been created by the EXPORT utility can only be read by IMPORT. Both tools are only used to maintain ORACLE database objects.</p>
<p>SQL*Loader is similar to Import in that it can load data; the main difference is that Import can read only Oracle export files. SQL*Loader can read text files generated by non-Oracle databases.To load data from other systems into the database you have to use SQL*LOADER or other programs. To store data from database into readable operating system files you may use e.g. REPORTS, SQLPLUS.</p>
<p>While still supported on 10g the original import (<em>imp</em>) and export (<em>exp</em>) utilities were replaced in 10g with the faster and more advanced Data Pump-based import-export, <em>impdp</em> and <em>expdp</em>.</p>
<p>NOTE: It is generally advised not to use exports as the only means of backing-up a database. Physical backup methods (for example, when you use RMAN) are normally much quicker and supports point in time based recovery (apply archivelogs after recovering a database). Also, exp/imp is not practical for large database environments.</p>
<p>On 11g just imp will be still available, so if you using 10g, now is the time to starting using data pump.</p>
<h2>Prerequisites/Requirements</h2>
<p>exp and imp are utilities present in the <strong><em>$ORACLE_HOME/bin</em></strong> directory and are installed when Oracle is installed. Their prime purpose is to move logical objects out of and into the database respectively &#8211; for example dumping all of the tables owned by a user to a single file is achieved using the exp utility. It is important to distinguish between dumping data in this manner and backing up the database which is normally achieved using the <em>rman</em> utility.</p>
<p><strong><em>$ORACLE_HOME, $ORACLE_SID</em></strong> and <strong><em>$PATH</em></strong> environment variables need to be set appropriately in a unix environment and the <strong><em>%ORACLE_SID%</em></strong> environment variable needs to be set in a windows environment, before executing these commands. If you login as the owner of the oracle software (usually the oracle user on unix) these are likely to have been set in the users profile. The Oracle Database instance needs to be up in order to export/import data. Type <em>&#8216;imp help=y&#8217;</em> or <em>&#8216;exp help=y&#8217;</em> for a detailed explanation of the available options for these utilities.</p>
<p>It is a prerequisite that <strong><em>oraenv</em></strong> or <strong><em>coraenv</em></strong> (if you are working in a c-shell) was executed before you export-import data. Consider, if you stored data in the database by using an national language support (NLS) other than AMERICAN you have to change your environment before import-export.<br />
Example for a german environment:<br />
<strong><em>NLS_LANG=GERMAN_GERMANY.WE8ISO8859P1</em></strong><strong><em><br />
</em></strong><strong><em>export NLS_LANG</em></strong></p>
<p>In order to use exp and imp, the <strong><em>catexp.sql</em></strong> script must be run. <em>catexp.sql</em> basically creates the <strong><em>exp_full_database</em></strong> and <strong><em>imp_full_database</em></strong> roles. It is found under <strong><em>$ORACLE_HOME/rdbms/admin</em></strong>:</p>
<p>SQL&gt; @?/rdbms/admin/catexp</p>
<p><em>catexp</em> is called by <em>catalog.sql</em>. Note: SQL*Plus provides a shortcut to refer to the ORACLE_HOME directory: the question mark (<strong>?</strong>).</p>
<p>One must have the create session privilege for being able to use exp. If objects of another user&#8217;s schema need to be exported, the <strong><em>EXP_FULL_DATABASE</em></strong> role is required.</p>
<p>Before one imports rows into already populated tables, one needs to truncate or drop these tables to get rid of the old data. If not, the new data will be appended to the existing tables or it&#8217;ll get rejected. Either way, use the same syntax when you are ready to import the data. One must always DROP existing Sequences before re-importing. If the sequences are not dropped, they will generate numbers inconsistent with the rest of the database.</p>
<p>Note: It is also advisable to drop indexes before importing to speed up the import process. Indexes can easily be recreated after the data was successfully imported.</p>
<p><strong>Control and Configure Export-Import</strong><strong><br />
</strong>FULL, OWNER, and TABLE are the three types of exports. A FULL export exports all objects, structures, and data within the database for all schemas. OWNER exports only those objects owned by the specified user accounts. TABLE exports only the specified tables and partitions for specific user accounts.</p>
<p>Because dozens of object types can be exported, it&#8217;s important to distinguish what gets exported with each export category:</p>
<ul>
<li>With <strong>TABLE</strong>, the specified table (or cluster or partition) is exported with its indexes, referential integrity constraints, synonyms, and triggers.</li>
<li>With <strong>OWNER</strong> specified, all the specified schema&#8217;s objects are exported. This includes database links, sequences, packages/procedures/functions, object-type definitions, clusters/tables/partitions, postable actions, synonyms, views, triggers, snapshots/snapshot logs, job queues, and refresh groups.</li>
<li>With the <strong>FULL</strong> option, all objects described in OWNER are exported for every user account, in addition to tablespace definitions, profiles, user definitions (and encrypted passwords), roles, resource costs, rollback segment definitions, directory aliases, user history table, and auditing options.</li>
</ul>
<p>You can use the Export and Import utilities in <strong><em>interactive</em></strong> or <strong><em>non-interactive</em></strong> mode. In interactive mode, Oracle steps you through the process, prompting for basic Import/Export session information. This method, however, limits you to the simple prompts that Oracle provides. You have more flexibility in non-interactive mode because you can supply up to 23 parameters for the Export utility and 24 parameters for the Import utility. The parameters may be supplied at the command line or by specifying a command file that contains all parameters and values. You can automate Export and Import sessions by using a command file, or repeat them over and over again manually.</p>
<p>The syntax of running Export and Import is as follows:<br />
<em>EXP KEYWORD=value or keyword=(value1,value2,&#8230;,valueN)<br />
IMP KEYWORD=value or keyword=(value1,value2,&#8230;,valueN)</em><br />
Replace KEYWORD with the parameter, and value with what should be the parameter&#8217;s value. For example, use the following to export the entire database:<br />
<em>EXP USERID=SYSTEM/MANAGER FULL=Y</em></p>
<p>Use the following to import the EMP and DEPT tables owned by the SCOTT user account: <em>IMP USERID=SYSTEM/MANAGER FROMUSER=SCOTT TABLES=(EMP,DEPT)</em>The following examples demonstrate how the imp/exp utilities can be used:<br />
<em>exp scott/tiger file=emp.dmp log=emp.log tables=emp rows=yes indexes=no<br />
exp scott/tiger file=emp.dmp tables=(emp,dept)<br />
imp scott/tiger file=emp.dmp full=yes<br />
imp scott/tiger file=emp.dmp fromuser=scott touser=scott tables=dept</em><em> </em></p>
<p>Using a parameter file:<br />
<em>exp userid=scott/tiger@orcl parfile=export.txt</em><br />
&#8230; where export.txt contains:<br />
BUFFER=100000<br />
FILE=account.dmp<br />
FULL=n<br />
OWNER=scott<br />
GRANTS=y<br />
COMPRESS=y<br />
NOTE: If you do not like command line utilities, you can import and export data with the &#8220;Schema Manager&#8221; GUI that ships with Oracle Enterprise Manager (OEM).<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
<em>The EXPORT utility may be used in three ways: </em></p>
<ul>
<li>Interactive dialogue<br />
Simply type <strong>exp</strong>. You will be prompted for your ORACLE userid, password. All other prompts answer by pressing the return key. This is the easiest way to export all data you stored in the ORACLE database. You may assign other values than the defaults to the parameters but in most cases it is unnecessary.</li>
<li>Controlled through bypassed parameters<br />
You may bypass parameters when you export data from the database. Type:<br />
<strong><em>exp</em></strong><em> &lt;userid<strong>/</strong>password&gt; &lt;parameter&gt;<strong>=</strong>&lt;value&gt;,&lt;parameter&gt;<strong>=</strong>&lt;value&gt;,&#8230;</em><br />
Example of exporting scott&#8217;s tables EMP and DEPT to file empdept.expdat and storing all messages to file empdept.log:<br />
<em>exp scott/tiger file=empdept.expdat tables=(EMP,DEPT) log=empdept.log</em></li>
<li>Parameterfile controlled<br />
Instead of typing the parameters on the commandline you may use a parameter file where the parameters are stored. The syntax for this method is: <em>exp &lt;userid/password&gt; parfile=&lt;filename&gt;</em></li>
</ul>
<p>Do not ignore warnings and messages. Look at your logfile and repeat EXPORT until you get messages like:</p>
<pre><em>About to export specified tables ...
. exporting table                            EMP       14 rows exported
. exporting table                           DEPT        4 rows exported
Export terminated successfully without warnings.</em>
--------------------------------------------------------------------------------------
Like Export the <em>Import utility</em> is controlled by parameters. To get familiar with these parameters type: <em>imp help=y</em>
You will get a short description of usage and default settings of parameters.
To start IMPORT simply type <strong>imp</strong>. You will be prompted for your ORACLE userid, password. The next prompts depend on what you answer. In most cases you may answer the prompts by pressing the return key. But the following prompts you have to answer carefully.
<em>Import file: expdat.dmp &gt;
</em>If your data was exported to file expdat.dmp press return, otherwise enter the filename where the exported data resides.
<em>Ignore create error due to object existence (yes/no): yes &gt;
</em>This is a flag to indicate how object creation errors should be handeld. If you import into an existing table and you set <strong><em>IGNORE=Y</em></strong>, rows could be duplicated if they where already present in the table.
<em>Import entire export file (yes/no): yes &gt; no
Username:
</em>If your exportfile consists of more objects than you want to import, enter no. In this case you will be prompted for the Username (this is normally your ORACLE account). <em>Enter table names. Null list means all tables for user
Enter table name or . if done:
</em>After entering the username you will be prompted for table names until you press the return key without entering a table name. Than IMPORT will be started.

Instead of the dialogue method you may use parameters. This is analogous to the methods described for EXPORT.
Examples:
<em>imp &lt;userid/password&gt; tables=(table1,table2)</em><em>
</em>Tables table1, table2 will be imported from the default file export.dmp into the database.
<em>imp &lt;userid/password&gt; parfile=&lt;filename&gt;</em>
Import will be controlled by the named parameterfile.
After importing you should get messages like:</pre>
<pre><em>importing SCOTT's objects into SCOTT
. importing table "DEPT"                                     4 rows imported
. importing table "EMP"                                     14 rows imported
Import terminated successfully without warnings.</em>
-----------------------------------------------------------------------------------</pre>
<p><strong>Parameters for the Export utility</strong></p>
<p>Table below lists all parameters that can be used with the Export utility, along with their default values (if any).</p>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td width="144" valign="top">
<p align="center"><strong>Parameter</strong></p>
</td>
<td width="96" valign="top">
<p align="center"><strong>Default Value</strong></p>
</td>
<td width="336" valign="top">
<p align="center"><strong>Description</strong></p>
</td>
</tr>
<tr>
<td width="144" valign="top">BUFFER</td>
<td width="96" valign="top">
<p align="center">OS-dependent</p>
</td>
<td width="336" valign="top">The size of BUFFER (in bytes) determines the memory buffer through which rows are exported. This should be larger than the size of the largest record multiplied by the number of rows that you want to fit within the buffer.</td>
</tr>
<tr>
<td width="144" valign="top">COMPRESS</td>
<td width="96" valign="top">
<p align="center">Y</p>
</td>
<td width="336" valign="top">If COMPRESS=Y, the INITIAL storage parameter is set to the total size of all extents allocated for the object. The change takes effect only when the object is imported.</td>
</tr>
<tr>
<td width="144" valign="top">CONSISTENT</td>
<td width="96" valign="top">
<p align="center">N</p>
</td>
<td width="336" valign="top">Setting CONSISTENT=Y exports all tables and references in a consistent state. This slows the export, as rollback space is used. If CONSISTENT=N and a record is modified during the export, the data will become inconsistent.</td>
</tr>
<tr>
<td width="144" valign="top">CONSTRAINTS</td>
<td width="96" valign="top">
<p align="center">N</p>
</td>
<td width="336" valign="top">Specifies whether table constraints are exported.</td>
</tr>
<tr>
<td width="144" valign="top">DIRECT</td>
<td width="96" valign="top">
<p align="center">N</p>
</td>
<td width="336" valign="top">If DIRECT=Y, Oracle bypasses the SQL command-processing layer, improving the speed of the export. Unfortunately, the new object types endemic to Oracle8, such as LOBs, don&#8217;t get exported.</td>
</tr>
<tr>
<td width="144" valign="top">FEEDBACK</td>
<td width="96" valign="top">
<p align="center">0</p>
</td>
<td width="336" valign="top">Oracle displays a period for each group of records inserted. FEEDBACK defines the size of the group. For example, if FEEDBACK=1000, a period will be displayed for every 1,000 records imported. This parameter is useful for tracking the progress of large imports.</td>
</tr>
<tr>
<td width="144" valign="top">FILE</td>
<td width="96" valign="top">
<p align="center">expdat.dmp</p>
</td>
<td width="336" valign="top">By default, expdat.dmp (stands for EXPort DATa.DuMP) is the filename. For a more meaningful name, change the FILE parameter.</td>
</tr>
<tr>
<td width="144" valign="top">FULL</td>
<td width="96" valign="top">
<p align="center">N</p>
</td>
<td width="336" valign="top">The entire database will be exported if FULL=Y, including tablespace definitions.</td>
</tr>
<tr>
<td width="144" valign="top">GRANTS</td>
<td width="96" valign="top">
<p align="center">Y</p>
</td>
<td width="336" valign="top">Specifies whether all grant definitions are exported for the objects being exported.</td>
</tr>
<tr>
<td width="144" valign="top">HELP</td>
<td width="96" valign="top">
<p align="center">N</p>
</td>
<td width="336" valign="top">No other parameters are needed if you specify HELP=Y. A basic help screen will appear.</td>
</tr>
<tr>
<td width="144" valign="top">INCTYPE</td>
<td width="96" valign="top">
<p align="center">
</td>
<td width="336" valign="top">The valid options for this parameter are COMPLETE, CUMULATIVE, and INCREMENTAL. A COMPLETE export lays down a full export for which the other two options rely on for restores of the database. CUMULATIVE exports all tables and other objects that have changed since the last CUMULATIVE or COMPLETE export was taken; if one record in a table is altered, the entire table is exported. INCREMENTAL exports all tables and objects that have changed since the last INCREMENTAL, CUMULATIVE, or COMPLETE export.</td>
</tr>
</tbody>
</table>
<p align="center">
<table border="1" cellpadding="0">
<tbody>
<tr>
<td width="600" valign="top"><strong>How can you easily see the Export/Import parameters and syntax?</strong></td>
</tr>
<tr>
<td width="600" valign="top">If you don&#8217;t have this book handy when necessary and haven&#8217;t memorized the dozens of parameters, the Export and Import utilities have a handy reference built in. Typing EXP HELP=Y or IMP HELP=Y at a command prompt brings up a nice one-page reference manual.</td>
</tr>
</tbody>
</table>
<p align="center">
<table border="1" cellpadding="0">
<tbody>
<tr>
<td width="185" valign="top">
<p align="center"><strong>Parameter</strong></p>
</td>
<td width="88" valign="top">
<p align="center"><strong>Default Value</strong></p>
</td>
<td width="303" valign="top">
<p align="center"><strong>Description</strong></p>
</td>
</tr>
<tr>
<td width="185" valign="top">INDEXES</td>
<td width="88" valign="top">
<p align="center">Y</p>
</td>
<td width="303" valign="top">Specifies whether user-defined indexes are exported. System indexes created with constraints (primary key, unique key) and OID indexes are automatically exported, regardless of this parameter&#8217;s value.</td>
</tr>
<tr>
<td width="185" valign="top">LOG</td>
<td width="88" valign="top">
<p align="center">
</td>
<td width="303" valign="top">Specifies the name of the file to spool the feedback from the export session. Unless otherwise specified, Oracle appends a .LOG extension to the file.</td>
</tr>
<tr>
<td width="185" valign="top">PARFILE</td>
<td width="88" valign="top">
<p align="center">
</td>
<td width="303" valign="top">Rather than enter all parameters on the command line, some or all can be kept in a parameter file. This parameter specifies which file to use, if desired. This parameter is especially useful for non-interactive import sessions.</td>
</tr>
<tr>
<td width="185" valign="top">POINT_IN_TIME_RECOVER</td>
<td width="88" valign="top">
<p align="center">N</p>
</td>
<td width="303" valign="top">Exports information for a point-in-time recovery for the tablespace listed with the TABLESPACES parameter.</td>
</tr>
<tr>
<td width="185" valign="top">RECORD</td>
<td width="88" valign="top">
<p align="center">Y</p>
</td>
<td width="303" valign="top">If you use the INCTYPE parameter with RECORD=Y, the SYS data dictionary tables INCEXP, INCFIL, and INCVID are populated with export data such as owner, type of export, and the time of export.</td>
</tr>
<tr>
<td width="185" valign="top">RECORDLENGTH</td>
<td width="88" valign="top">
<p align="center">OS-dependent</p>
</td>
<td width="303" valign="top">The RECORDLENGTH parameter is used only when you&#8217;ll import on a machine with a different byte count of the file than on the machine where the export occurs. The default should be used in most import sessions.</td>
</tr>
<tr>
<td width="185" valign="top">RECOVERY_TABLESPACES</td>
<td width="88" valign="top">
<p align="center">
</td>
<td width="303" valign="top">Used with POINT_IN_TIME_RECOVER;specifies which tablespaces can be recovered by using point-in-time recovery. This is important because imports otherwise can&#8217;t recover transactions past the time of export.</td>
</tr>
<tr>
<td width="185" valign="top">ROWS</td>
<td width="88" valign="top">
<p align="center">Y</p>
</td>
<td width="303" valign="top">Specifies whether table and object data will be exported. If ROWS=N, only object definitions are exported.</td>
</tr>
<tr>
<td width="185" valign="top">STATISTICS</td>
<td width="88" valign="top">
<p align="center">ESTIMATE</p>
</td>
<td width="303" valign="top">Specifies whether table and index statistics are to be analyzed with COMPUTE or ESTIMATE when imported. Only those objects that already have statistics on them will be analyzed during import. Specify NONE if no objects should be analyzed.</td>
</tr>
<tr>
<td width="185" valign="top">TABLES</td>
<td width="88" valign="top">
<p align="center">
</td>
<td width="303" valign="top">Specifies a comma-separated list of all tables to be exported. This parameter could be used with the OWNER parameter to specify which owner to associate the tables with. Tables can also be specified with the owner.table_name format. In a non-UNIX environment such as Windows NT, you must enclose the table list within parentheses.</td>
</tr>
<tr>
<td width="185" valign="top">TABLESPACES</td>
<td width="88" valign="top">
<p align="center">
</td>
<td width="303" valign="top">List of tablespaces to be exported with the POINT_IN_TIME_RECOVER parameter.</td>
</tr>
<tr>
<td width="185" valign="top">USERID</td>
<td width="88" valign="top">
<p align="center">
</td>
<td width="303" valign="top">Specifies the username and password for the user conducting the import. The format for the command is username/password. You can also use Net8&#8217;s @connect_string format if you want.</td>
</tr>
</tbody>
</table>
<p><strong>Parameters for the Import utility</strong><strong><br />
</strong>You can use 24 parameters during an import session. They may be specified in the command line or any specified parameter file. Table below lists all the import parameters.</p>
<table border="1" cellpadding="0">
<tbody>
<tr>
<td width="144" valign="top">
<p align="center"><strong>Parameter</strong></p>
</td>
<td width="96" valign="top">
<p align="center"><strong>Default Value</strong></p>
</td>
<td width="336" valign="top">
<p align="center"><strong>Description</strong></p>
</td>
</tr>
<tr>
<td width="144" valign="top">ANALYZE</td>
<td width="96" valign="top">
<p align="center">Y</p>
</td>
<td width="336" valign="top">Imported tables have their statistics analyzed if ANALYZE is set to Y. Only those tables that already had statistics on them during the export are computed. The tables will be ESTIMATED by default, unless the export was performed with the STATISTICS=COMPUTE parameter configuration.</td>
</tr>
<tr>
<td width="144" valign="top">BUFFER</td>
<td width="96" valign="top">
<p align="center">OS-dependent</p>
</td>
<td width="336" valign="top">The BUFFER size (in bytes) determines the memory buffer through which rows are imported. This should be larger than the size of the largest record multiplied by the number of rows that you want to fit within the buffer.</td>
</tr>
<tr>
<td width="144" valign="top">CHARSET</td>
<td width="96" valign="top"></td>
<td width="336" valign="top">An obsolete Oracle6 parameter, indicating whether the export was done in ASCII or EBCDIC. This information is processed automatically in Oracle7 and Oracle8.</td>
</tr>
<tr>
<td width="144" valign="top">COMMIT</td>
<td width="96" valign="top">
<p align="center">N</p>
</td>
<td width="336" valign="top">By default, a COMMIT occurs after each table, nested table, and partition. If you&#8217;re importing a large table, the rollback segments may grow large. To improve performance while loading large tables, you should set COMMIT=Y.</td>
</tr>
<tr>
<td width="144" valign="top">DESTROY</td>
<td width="96" valign="top">
<p align="center">N</p>
</td>
<td width="336" valign="top">If you set DESTROY=Y and do a full import, Oracle will overwrite any data files that exist. If you use raw devices for your data files, they will be overwritten during a full import, as DESTROY=N won&#8217;t prevent the overwriting of datafiles! Don&#8217;t use this option unless you know what you&#8217;re doing.</td>
</tr>
<tr>
<td width="144" valign="top">FEEDBACK</td>
<td width="96" valign="top">
<p align="center">0</p>
</td>
<td width="336" valign="top">Oracle displays a period for each group of records inserted. FEEDBACK defines the size of the group. For example, if FEEDBACK=1000, a period is displayed for every 1,000 records imported. This parameter is useful for tracking the progress of large imports.</td>
</tr>
</tbody>
</table>
<p align="center">
<table border="1" cellpadding="0">
<tbody>
<tr>
<td width="600" valign="top"><strong>Export/Import and non-Oracle databases</strong></td>
</tr>
<tr>
<td width="600" valign="top">The export file (expdat.dmp by default) is a binary file that only Oracle databases can read. Many databases and PC software can export data into delimited text files, but the Export utility can&#8217;t. To transfer data from Oracle to a non-Oracle database, you must make a delimited file manually by spooling from within PL/SQL or SQL*Plus and running a custom-made script.</td>
</tr>
</tbody>
</table>
<p align="center">
<table border="1" cellpadding="0">
<tbody>
<tr>
<td width="144" valign="top">
<p align="center"><strong>Parameter</strong></p>
</td>
<td width="96" valign="top">
<p align="center"><strong>Default Value</strong></p>
</td>
<td width="336" valign="top">
<p align="center"><strong>Description</strong></p>
</td>
</tr>
<tr>
<td width="144" valign="top">FILE</td>
<td width="96" valign="top">expdat.dmp</td>
<td width="336" valign="top">By default, expdat.dmp (stands for EXPort DATa.DuMP) is the name of the file that Import will import from. If the file is something other than expdat.dmp, specify it with this parameter.</td>
</tr>
<tr>
<td width="144" valign="top">FROMUSER</td>
<td width="96" valign="top"></td>
<td width="336" valign="top">Specifying this parameter imports only those objects owned by the FROMUSER user account.</td>
</tr>
<tr>
<td width="144" valign="top">FULL</td>
<td width="96" valign="top">
<p align="center">N</p>
</td>
<td width="336" valign="top">The entire database will be imported if FULL=Y.</td>
</tr>
<tr>
<td width="144" valign="top">GRANTS</td>
<td width="96" valign="top">
<p align="center">Y</p>
</td>
<td width="336" valign="top">Specifies whether all grants will be created for the exported objects.</td>
</tr>
<tr>
<td width="144" valign="top">HELP</td>
<td width="96" valign="top">
<p align="center">N</p>
</td>
<td width="336" valign="top">No other parameters are needed if you specify HELP=Y. A basic help screen will appear.</td>
</tr>
<tr>
<td width="144" valign="top">IGNORE</td>
<td width="96" valign="top">
<p align="center">N</p>
</td>
<td width="336" valign="top">If IGNORE=Y, object creation errors are ignored, and records are inserted into the table. Duplicate records can result, if no unique constraints exist for the table. Non-object creation errors are still reported, such as operating system problems.</td>
</tr>
<tr>
<td width="144" valign="top">INCTYPE</td>
<td width="96" valign="top"></td>
<td width="336" valign="top">If you&#8217;re importing an incremental export, tables are dropped and recreated. You must first restore from the last SYSTEM export (specify INCTYPE=SYSTEM). Then import every incremental export (specify INCTYPE=RESTORE) until the desired changes are applied to the database.</td>
</tr>
<tr>
<td width="144" valign="top">INDEXES</td>
<td width="96" valign="top">
<p align="center">Y</p>
</td>
<td width="336" valign="top">Specifies whether user-defined indexes are imported. System indexes created with constraints (primary key, unique key) and OID indexes are automatically imported, regardless of this parameter&#8217;s value.</td>
</tr>
<tr>
<td width="144" valign="top">INDEXFILE</td>
<td width="96" valign="top"></td>
<td width="336" valign="top">Specifies the name of the file to generate CREATE INDEX statements. Unless otherwise specified, Oracle appends an .SQL extension to the file. (This parameter is explained in more detail later in this chapter.)</td>
</tr>
</tbody>
</table>
<p align="center">
<table border="1" cellpadding="0">
<tbody>
<tr>
<td width="600" valign="top"><strong>Using the </strong><strong>LOG </strong><strong>parameter</strong></td>
</tr>
<tr>
<td width="600" valign="top">You can specify a <em>log file </em>for the Export and Import sessions with the LOG parameter. The file, which mimics what&#8217;s output to the screen, reports all successful and unsuccessful messages to be examined at a later point. Some Oracle experts use this file during an automated load process and then checks the file for errors. A database administrator is paged if any appear.</td>
</tr>
</tbody>
</table>
<p align="center">
<table border="1" cellpadding="0">
<tbody>
<tr>
<td width="187" valign="top">
<p align="center"><strong>Parameter</strong></p>
</td>
<td width="92" valign="top">
<p align="center"><strong>Default Value</strong></p>
</td>
<td width="298" valign="top">
<p align="center"><strong>Description</strong></p>
</td>
</tr>
<tr>
<td width="187" valign="top">LOG</td>
<td width="92" valign="top">
<p align="center">
</td>
<td width="298" valign="top">Specifies the name of the file to spool the feedback from the import session. Unless otherwise specified, Oracle appends an .LOG extension to the file.</td>
</tr>
<tr>
<td width="187" valign="top">PARFILE</td>
<td width="92" valign="top">
<p align="center">
</td>
<td width="298" valign="top">Rather than enter all parameters on the command line, some or all may be kept in a parameter file. The PARFILE parameter specifies which file to use, if desired. This parameter is especially useful for non-interactive import sessions.</td>
</tr>
<tr>
<td width="187" valign="top">POINT_IN_TIME_RECOVER</td>
<td width="92" valign="top">
<p align="center">N</p>
</td>
<td width="298" valign="top">Performs a point-in-time recovery for the tablespace exported with the TABLESPACES parameter.</td>
</tr>
<tr>
<td width="187" valign="top">RECORDLENGTH</td>
<td width="92" valign="top">
<p align="center">OS-dependent</p>
</td>
<td width="298" valign="top">Used only when importing on a machine with a different byte count of the file than on the machine where the export occurred. The default should be used in most Import sessions.</td>
</tr>
<tr>
<td width="187" valign="top">SHOW</td>
<td width="92" valign="top">
<p align="center">N</p>
</td>
<td width="298" valign="top">Displays each SQL statement and doesn&#8217;t apply them to the database. The SQL statements can be viewed and modified when used with the FILE parameter. (The SHOW parameter is explained in more detail later in this chapter.)</td>
</tr>
<tr>
<td width="187" valign="top">SKIP_UNUSABLE_INDEXES</td>
<td width="92" valign="top">
<p align="center">N</p>
</td>
<td width="298" valign="top">Allows the postponement of index creation until the record data is imported. The indexes affected are only those set to an unusable state, and all other indexes are created if INDEXES=Y (the default value) is set.</td>
</tr>
<tr>
<td width="187" valign="top">TABLES</td>
<td width="92" valign="top">
<p align="center">
</td>
<td width="298" valign="top">Specifies a comma-separated list of all tables to be imported. You should use this parameter with the FROMUSER parameter. In a non-UNIX environment, such as Windows NT, enclose the table list within parentheses.</td>
</tr>
<tr>
<td width="187" valign="top">TOUSER</td>
<td width="92" valign="top">
<p align="center">
</td>
<td width="298" valign="top">Specifies the user account into which tables should be imported, if you want it to be different from the original owner of the tables. This parameter needs to be used with the FROMUSER parameter.</td>
</tr>
<tr>
<td width="187" valign="top">USERID</td>
<td width="92" valign="top">
<p align="center">
</td>
<td width="298" valign="top">Specifies the username and password for the user conducting the import. The format for the command is username/password. You may also use Net8&#8217;s @connect_string format if desired.</td>
</tr>
</tbody>
</table>
<h2>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;Using imp/exp across different Oracle version</h2>
<p>If exp and imp are used to export data from an Oracle database with a different version than the database in which is imported, then the following rules apply:</p>
<ul>
<li>1. exp must be of the lower version</li>
<li>2. imp must match the target version</li>
</ul>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<strong>Common Export/Import Errors</strong></p>
<ul>
<li><strong>ORA-00001: Unique constraint (&#8230;) violated</strong><br />
You are importing duplicate rows. Use IGNORE=YES to skip tables that already exist (imp will give an error if the object is re-created) OR Perform the following actions:</li>
<li>1. Back up the target table.</li>
<li>2. Try deleting the target table.</li>
<li>3. Run the import for this table again in overwrite mode.</li>
<li><strong>ORA-01555: Snapshot too old</strong><br />
Ask your users to STOP working while you are exporting or try using parameter CONSISTENT=NO</li>
<li><strong>ORA-01562: Failed to extend rollback segment</strong><br />
Create bigger rollback segments or set parameter COMMIT=Y while importing</li>
<li><strong>IMP-00015: Statement failed &#8230; object already exists&#8230;</strong><br />
Use the IGNORE=Y import parameter to ignore these errors, but be careful as you might end up with duplicate rows.</li>
</ul>
<p><a name="BACDAACC"></a><a name="i1008356"></a><a name="BACFJHAI"></a><a name="i1008361"></a><a name="BACGIDJI"></a><a name="i1008366"></a><a name="BACHBHDD"></a><a name="i1008371"></a><a name="BACHJCCC"></a>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
<strong>To Improve performance<em> </em></strong></p>
<p><strong>Export</strong></p>
<ul>
<li>Set the BUFFER parameter to a high value (e.g. 2Mb &#8212; entered as an integer &#8220;2000000&#8243;)</li>
<li>Set the RECORDLENGTH parameter to a high value (e.g. 64Kb &#8212; entered as an integer &#8220;64000&#8243;)</li>
<li>Use DIRECT=yes (direct mode export)</li>
<li>Stop unnecessary applications to free-up resources for your job.</li>
<li>If you run multiple export sessions, ensure they write to different physical disks.</li>
<li>DO NOT export to an NFS mounted filesystem. It will take forever.</li>
</ul>
<p><strong>Import</strong><strong><em> </em></strong></p>
<ul>
<li>Create an indexfile so that you can create indexes AFTER you have imported data. Do this by setting INDEXFILE to a filename and then import. No data will be imported but a file containing index definitions will be created. You must edit this file afterwards and supply the passwords for the schemas on all CONNECT statements. <strong><em> </em></strong></li>
<li>Place the file to be imported on a separate physical disk from the oracle data files<strong><em> </em></strong></li>
<li>Increase DB_CACHE_SIZE (DB_BLOCK_BUFFERS prior to 9i) considerably in the init$SID.ora file <strong><em> </em></strong></li>
<li>Set the LOG_BUFFER to a big value and restart oracle. <strong><em> </em></strong></li>
<li>Stop redo log archiving if it is running (ALTER DATABASE NOARCHIVELOG;)<strong><em> </em></strong></li>
<li>Create a BIG tablespace with a BIG rollback segment inside. Set all other rollback segments offline (except the SYSTEM rollback segment of course). The rollback segment must be as big as your biggest table (I think?) <strong><em> </em></strong></li>
<li>Use COMMIT=N in the import parameter file if you can afford it <strong><em> </em></strong></li>
<li>Use STATISTICS=NONE in the import parameter file to avoid time consuming to import the statistics <strong><em> </em></strong></li>
<li>Remember to run the indexfile previously created <strong><em> </em></strong></li>
</ul>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
<strong>Good practices</strong></p>
<ul>
<li>Always take care about CHARSETS when you do export and import. Using the wrong ones can convert your data in a lossy manner. The best situation is when your source and destination database have the same character sets, so you can avoid completely any character conversion. You control this behavior by setting NLS_LANG environment variable appropriately. When not set properly you may see &#8216;Exporting questionable statistics&#8217; messages.</li>
<li>After doing an export, it is better to check your dump by doing an import with the parameter SHOW=Y. This checks the validity of your dump file.</li>
</ul>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<strong>Other considerations</strong></p>
<ul>
<li>You may need to patch your Oracle client (where you are running exp/imp) to the same level as the Oracle server to prevent errors</li>
<li>When importing large amounts of data consider dropping indexes prior to the import to speed up the process and re-creating them once the import is completed</li>
<li>The amount of archive logs that may be created on a large import may fill up your disk</li>
<li>On INSERT triggers will fire, consider whether these need to be disabled</li>
<li>Increasing the RECORDLENGTH (max 65535) parameter can improve the length of time to perform an import/export as well as DIRECT=y for export</li>
</ul>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Tablespace fragmentation occurs when objects are created, dropped, enlarged, and shrunk. The more often this occurs, the more fragmented the tablespace becomes. This causes free space to be broken into many separated island-like chunks of space. In addition, if an object has multiple extents, they could be spread out over different parts of the tablespace; this causes performance and maintenance problems. With many small blocks of free space instead of fewer large free spaces, you may be unable to create some objects that you otherwise could have. By defragmenting the tablespace, the data is reorganized so that all free space is put into one contiguous area, and each object&#8217;s extents are grouped next to each other.</p>
<ul>
<li>The Export and Import utilities can fix fragmentation in two ways:<br />
They can take a table with multiple extents and resize it into a table with one larger extent. This larger single extent will encompass the total size of all previous table extents.</li>
<li>They can make all objects within the tablespace adjacent to each other with no island-like characteristics, while at the same time merging all the free space into one larger free space.</li>
</ul>
<p>The easiest and most dramatic method fixes both fragmentation problems for the entire database. The database is shut down during the process. This forces all sessions against the database to stop (which is why it&#8217;s the most dramatic method).</p>
<p>Fixing a table&#8217;s storage parameter is fairly easy compared to the entire tablespace, as only one table is affected. To fix an entire tablespace, you&#8217;ll have to drop and recreate it, along with all the tables within it.</p>
<p><strong>Fix both fragmentation problems quickly</strong></p>
<ul type="disc">
<li>Export the entire database, specifying <tt>FULL=Y</tt> and <tt>COMPRESS=Y</tt>. <tt>FULL=Y</tt> exports the entire database; <tt>COMPRESS=Y</tt> changes the <tt>INITIAL</tt> storage parameter of each table in the database (if necessary) to fit within one extent each. For example, if a table has five 10M extents, the <tt>COMPRESS=Y</tt> specification changes the table to one 50M extent when imported.</li>
<li>Drop and recreate the entire database.</li>
<li>Import the entire database with the <tt>FULL=Y</tt> parameter.</li>
</ul>
<p><strong>Defragment just one tablespace (a less dramatic method)</strong></p>
<ul type="disc">
<li>Determine which tables exist in the tablespace and export just those tables.</li>
<li>Drop all the tables in the tablespace.</li>
<li>Issue the <tt>ALTER TABLESPACE COALESCE</tt> command (or drop and recreate the tablespace). This will coalesce all the free space within the tablespace into one contiguous area.</li>
<li>Import the tables. Oracle will create the tables adjacent to each other within the tablespace, and all free space will still be contiguous in one chunk of space. <strong> </strong></li>
</ul>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><strong>Some more examples</strong></p>
<p><strong>EXP</strong><br />
To dump a single schema to disk (we use the scott example schema here)</p>
<p>- Login to server which has an Oracle client</p>
<p><em>exp &lt;user&gt;/&lt;password&gt; FILE=scott.dmp OWNER=scott</em><br />
To export specific tables to disk: Login to server which has an Oracle client</p>
<p><em>exp SYSTEM/password FIlE=expdat.dmp TABLES=(scott.emp,hr.countries) </em></p>
<p>The above command uses two users : scott and hr</p>
<p><em> </em></p>
<p><em>exp &lt;user&gt;/&lt;password&gt; FILE=scott.dmp TABLES=(emp,dept) </em></p>
<p>the above is only for one user : scott</p>
<p><strong>IMP<br />
</strong>To import the full database exported in the example above.<br />
<em>imp SYSTEM/password FULL=y FIlE=dba.dmp </em></p>
<p>To import just the dept and emp tables from the scott schema<br />
<em>imp SYSTEM/password FIlE=dba.dmp FROMUSER=scott TABLES=(dept,emp) </em></p>
<p>To import tables and change the owner</p>
<p><em>imp SYSTEM/password FROMUSER=blake TOUSER=scott FILE=blake.dmp TABLES=(unit,manager)</em><br />
To import just the scott schema exported in the example above:<br />
<em>imp &lt;user&gt;/&lt;password&gt; FIlE=scott.dmp</em></p>
<p>If you do not supply any parameters then you enter an interactive session as illustrated below. (Responses to prompts are shown in blue<strong>. </strong>from the prompt type imp and press enter</p>
<p>$&gt;imp<br />
Import: Release 9.2.0.6.0 &#8211; Production on Thu Mar 29 15:07:43 2007<br />
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.<br />
Username: SYSTEM<br />
Password: password<br />
Connected to: Oracle9i Enterprise Edition Release 9.2.0.6.0 &#8211; Production<br />
With the Partitioning, OLAP and Oracle Data Mining options<br />
JServer Release 9.2.0.6.0 &#8211; Production<br />
Import file: expdat.dmp &gt; /mention/path/of/dumpFile/includingFileName.dmp<br />
Enter insert buffer size (minimum is 8192) 30720&gt;<strong> </strong>(press enter to accept default)<br />
Export file created by EXPORT:V09.02.00 via conventional path<br />
import done in US7ASCII character set and AL16UTF16 NCHAR character set<br />
import server uses AL32UTF8 character set (possible charset conversion)<br />
List contents of import file only (yes/no): no &gt; press enter<br />
Ignore create error due to object existence (yes/no): no &gt; press enter<br />
Import grants (yes/no): yes &gt; press enter<br />
Import table data (yes/no): yes &gt; press enter<br />
Import entire export file (yes/no): no &gt; press enter or type no<br />
Username: give the userName for which you want the data to be imported<br />
Enter table(T) or partition(T:P) names. Null list means all tables for user<br />
Enter table(T) or partition(T:P) name or . if done: press enter<br />
. importing TST_001_V2&#8217;s objects into TST_001_V2</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.oratraining.com%2Fblog%2F2009%2F06%2Foracle-export-and-import-utility-tutorial%2F&amp;linkname=Oracle%20Export%20and%20Import%20utility%20tutorial"><img src="http://www.oratraining.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.oratraining.com/blog/2009/06/oracle-export-and-import-utility-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing RedHat Linux</title>
		<link>http://www.oratraining.com/blog/2009/04/installing-redhat-linux/</link>
		<comments>http://www.oratraining.com/blog/2009/04/installing-redhat-linux/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 07:00:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux/Unix/Solaris]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Unix administration]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[Installing Linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Unix Administration]]></category>

		<guid isPermaLink="false">http://www.oratraining.com/blog/?p=160</guid>
		<description><![CDATA[





































































]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image001.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image002.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image003.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image004.jpg" alt="" /></a></p>
<p><span id="more-160"></span><a href="http://www.oratraining.com/images/blog/installation/rhel/image005.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image006.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image007.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image008.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image009.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image010.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image011.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image012.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image013.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image014.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image015.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image016.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image017.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image018.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image019.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image020.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image021.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image022.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image023.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image024.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image025.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image026.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image027.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image028.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image029.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image030.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image031.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image032.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image033.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image034.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image035.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image036.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image037.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image038.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image039.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image040.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image041.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image042.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image043.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image044.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image045.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image046.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image047.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image048.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image049.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image050.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image051.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image052.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image053.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image054.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image055.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image056.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image057.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image058.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image059.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image060.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image061.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image062.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image063.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image064.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image065.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image066.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image067.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image068.jpg" alt="" /></a></p>
<p><a href="http://www.oratraining.com/images/blog/installation/rhel/image069.jpg" target="_new"><br />
<img src="http://www.oratraining.com/images/blog/installation/rhel/image070.jpg" alt="" /></a></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.oratraining.com%2Fblog%2F2009%2F04%2Finstalling-redhat-linux%2F&amp;linkname=Installing%20RedHat%20Linux"><img src="http://www.oratraining.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.oratraining.com/blog/2009/04/installing-redhat-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
