<?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 &#187; Shell scripting</title>
	<atom:link href="http://www.oratraining.com/blog/category/linuxunixsolaris/shell-scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.oratraining.com/blog</link>
	<description>Not just another Oracle Blog</description>
	<lastBuildDate>Tue, 25 May 2010 12:22:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Unix/Solaris Terminal too wide</title>
		<link>http://www.oratraining.com/blog/2010/04/unixsolaris-terminal-too-wide/</link>
		<comments>http://www.oratraining.com/blog/2010/04/unixsolaris-terminal-too-wide/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 12:10:56 +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=240</guid>
		<description><![CDATA[On older Solaris or other Unix systems we quite often see following error while opening log files etc in vi or view terminal

root&#62; vi abc
Terminal too wide
:

This is because the terminal is not wide enough to display more characters in one line.
Solution:
Execute following command on shell prompt. This will increase the width the number of [...]]]></description>
			<content:encoded><![CDATA[<p>On older Solaris or other Unix systems we quite often see following error while opening log files etc in vi or view terminal</p>
<blockquote>
<div id="_mcePaste"><span style="color: #0000ff;">root&gt; vi abc</span></div>
<div id="_mcePaste"><span style="color: #0000ff;">Terminal too wide</span></div>
<div id="_mcePaste"><span style="color: #0000ff;">:</span></div>
</blockquote>
<div>This is because the terminal is not wide enough to display more characters in one line.</div>
<p><strong>Solution:</strong></p>
<p>Execute following command on shell prompt. This will increase the width the number of columns on the terminal. After this you should be able to open files in vi or view without any issues.</p>
<blockquote><p><strong><span style="color: #0000ff;">stty columns 120</span></strong></p></blockquote>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.oratraining.com%2Fblog%2F2010%2F04%2Funixsolaris-terminal-too-wide%2F&amp;linkname=Unix%2FSolaris%20Terminal%20too%20wide"><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> </p>]]></content:encoded>
			<wfw:commentRss>http://www.oratraining.com/blog/2010/04/unixsolaris-terminal-too-wide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unix delete or rename a file starting with hyphen or junk character</title>
		<link>http://www.oratraining.com/blog/2010/04/unix-delete-or-rename-a-file-starting-with-hyphen-or-junk-character/</link>
		<comments>http://www.oratraining.com/blog/2010/04/unix-delete-or-rename-a-file-starting-with-hyphen-or-junk-character/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 11:22:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux/Unix/Solaris]]></category>
		<category><![CDATA[Shell scripting]]></category>
		<category><![CDATA[Unix administration]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[junk character]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[putty]]></category>
		<category><![CDATA[rename]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.oratraining.com/blog/?p=235</guid>
		<description><![CDATA[Many a times we face a problem wherein mistakenly some files get created in a directory which are hard to rename or remove especially when working with putty terminal, by mistake if you paste come content on command prompt then it will create junk files with hyphen, tilde or any junk character in beginning.
For example [...]]]></description>
			<content:encoded><![CDATA[<p>Many a times we face a problem wherein mistakenly some files get created in a directory which are hard to rename or remove especially when working with putty terminal, by mistake if you paste come content on command prompt then it will create junk files with hyphen, tilde or any junk character in beginning.</p>
<p>For example <span style="color: #0000ff;">&#8220;-abc&#8221;</span>, <span style="color: #0000ff;">&#8220;~abc&#8221;</span> etc.</p>
<p><strong>Solution:</strong></p>
<p>In this case &#8220;<span style="color: #0000ff;">rm -abc</span>&#8221; or &#8220;<span style="color: #0000ff;">rm ~abc</span>&#8221; etc will not work. Simple solution is to use &#8220;<span style="color: #0000ff;">rm ./-abc</span>&#8221; or &#8220;<span style="color: #0000ff;">rm./~abc</span>&#8221; etc</p>
<p> <img src='http://www.oratraining.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.oratraining.com%2Fblog%2F2010%2F04%2Funix-delete-or-rename-a-file-starting-with-hyphen-or-junk-character%2F&amp;linkname=Unix%20delete%20or%20rename%20a%20file%20starting%20with%20hyphen%20or%20junk%20character"><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> </p>]]></content:encoded>
			<wfw:commentRss>http://www.oratraining.com/blog/2010/04/unix-delete-or-rename-a-file-starting-with-hyphen-or-junk-character/feed/</wfw:commentRss>
		<slash:comments>0</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>
<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%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> </p>]]></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>
<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-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> </p>]]></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>
<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> </p>]]></content:encoded>
			<wfw:commentRss>http://www.oratraining.com/blog/2009/06/unix-commands-quick-reference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
