tag:blogger.com,1999:blog-50144666444205179022024-03-13T09:25:13.138+05:30Prashant's Way to OracleHere you will find all the information and discussion related to an ORACLE DBA.
Right from the beginning each and every thing will be explained with the help of all online resources and in a very simple manner.
Hope for your Support
thanks to all.
~venomPrashant Namdeohttp://www.blogger.com/profile/01363618383966360072noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-5014466644420517902.post-67388482457629112392015-05-01T23:54:00.001+05:302015-05-01T23:54:30.453+05:30Enabling and Disabling FND Debug from Backend<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="line-height: 26px;">
<header class="entry-header" style="color: black; line-height: normal;"><div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<span style="background-color: white;"><b><span style="color: #333333; font-family: Arial, sans-serif; font-size: 13.5pt;"><br />
</span></b><b><span style="color: #333333; font-family: "Arial","sans-serif"; font-size: 13.5pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">Basically Two reasons why we need to enable/disable FND debug
from backend.</span></b><span style="color: #333333; font-family: 'Times New Roman', serif; font-size: 13.5pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<span style="background-color: white;"><span style="color: #333333; font-family: "Arial","sans-serif"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman";">1.</span><b><i><span style="color: #333333; font-family: "Arial","sans-serif"; font-size: 13.5pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">When trying to enable
“FND: Debug Log Enabled”, in the below window, it might gray out and may not
allow you to change it.</span></i></b><span style="color: #333333; font-family: "Times New Roman","serif"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div style="color: #333333; font-family: Georgia, serif; font-size: 16px; line-height: 26px;">
<a href="https://dbaprashant.files.wordpress.com/2014/10/capture.jpg" sl-processed="1" style="background-color: white; color: #5e191a; text-decoration: none;"><img alt="Capture" class="alignnone size-medium wp-image-12" height="82" src="https://dbaprashant.files.wordpress.com/2014/10/capture.jpg?w=300&h=62" style="border: none; height: auto; margin-bottom: 0.5em; max-width: 100%;" width="400" /></a></div>
<div style="color: #333333; font-family: Georgia, serif; font-size: 16px; line-height: 26px;">
<br /></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<span style="background-color: white;"><span style="color: #333333; font-family: "Arial","sans-serif"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman";">2. </span><i><span style="color: #333333; font-family: "Arial","sans-serif"; font-size: 13.5pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">Sometimes it happens
when you see something like <b>“FND Debug Enabled, this might reduce
the performance”</b> on the Login Screen, that time it becomes difficult
to <b>disable </b>it from front end, as you may not be able to
navigate or open the profile option form.</span></i><span style="color: #333333; font-family: "Times New Roman","serif"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div align="center" class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt; text-align: center;">
<span style="background-color: white;"><b><span style="color: #333333; font-family: "Arial","sans-serif"; font-size: 13.5pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">——————————- Come'on Lets play now
——————————–</span></b><span style="color: #333333; font-family: "Times New Roman","serif"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div align="center" class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt; text-align: center;">
<br /></div>
<div align="center" class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt; text-align: center;">
<b><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">-------------------------------------------------------------------------------------------------------------------------------------------------------------------</span></b></div>
<div align="center" class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt; text-align: center;">
<b><u><span style="background-color: #fce5cd; color: #333333; font-family: Arial, sans-serif; font-size: 18pt;">To Enable FND DEBUG</span></u></b><span style="background-color: white; color: #333333; font-family: 'Times New Roman', serif; font-size: 13.5pt;"><o:p></o:p></span></div>
<div align="center" class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt; text-align: center;">
<b><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">-------------------------------------------------------------------------------------------------------------------------------------------------------------------</span></b></div>
<div align="center" class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt; text-align: center;">
<br /></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<i><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">SQL> SELECT
PROFILE_OPTION_ID,PROFILE_OPTION_NAME FROM FND_PROFILE_OPTIONS_VL <o:p></o:p></span></i></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<i><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">WHERE START_DATE_ACTIVE <= SYSDATE <o:p></o:p></span></i></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<i><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">and NVL(END_DATE_ACTIVE,SYSDATE) >= SYSDATE <o:p></o:p></span></i></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<i><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">and ( SITE_ENABLED_FLAG = 'Y' or
APP_ENABLED_FLAG = 'Y'<o:p></o:p></span></i></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<i><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">or RESP_ENABLED_FLAG = 'Y' or USER_ENABLED_FLAG
= 'Y' <o:p></o:p></span></i></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<i><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">or SERVER_ENABLED_FLAG = 'Y' or
SERVERRESP_ENABLED_FLAG = 'Y'<o:p></o:p></span></i></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<i><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;"> or
ORG_ENABLED_FLAG = 'Y') <o:p></o:p></span></i></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<i><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">and ( UPPER(USER_PROFILE_OPTION_NAME) LIKE
'%FND%DEBUG%' <o:p></o:p></span></i></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<i><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">and (USER_PROFILE_OPTION_NAME LIKE '%f%' or <o:p></o:p></span></i></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<i><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">USER_PROFILE_OPTION_NAME LIKE '%F%')) <o:p></o:p></span></i></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<span style="background-color: white;"><i><span style="font-family: Arial, sans-serif; font-size: 10pt;">order by user_profile_option_name;</span></i><span style="color: #333333; font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<span style="background-color: white;"><span style="color: #333333; font-family: "Arial","sans-serif"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman";">PROFILE_OPTION_ID
PROFILE_OPTION_NAME<br />
—————– ———————————–<br />
<i>4176 AFLOG_ENABLED</i></span><span style="color: #333333; font-family: "Times New Roman","serif"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<span style="background-color: white;"><span style="color: #333333; font-family: "Arial","sans-serif"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman";">3098
AFLOG_FILENAME<br />
3099 AFLOG_LEVEL<br />
8470 AFLOG_BUFFER_MODE<br />
3100 AFLOG_MODULE<br />
8468 DEBUG RULE THRESHOLD</span><span style="color: #333333; font-family: "Times New Roman","serif"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<span style="background-color: white;"><span style="color: #333333; font-family: "Arial","sans-serif"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman";">6 rows selected.</span><span style="color: #333333; font-family: "Times New Roman","serif"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<b style="text-align: center;"><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">-------------------------------------------------------------------------------------------------------------------------------------------------------------------</span></b></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<span style="background-color: white;"><b><span style="color: #333333; font-family: "Arial","sans-serif"; font-size: 13.5pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">Note
Down this Profile_option_id for “AFLOG_ENABLED”</span></b><span style="color: #333333; font-family: "Times New Roman","serif"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<span style="background-color: white;"><span style="color: #333333; font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">Now Execute another sql which will let you
know the <b>Value</b> of that <b>PROFILE_OPTION</b></span><span style="color: #333333; font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<b style="text-align: center;"><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">-------------------------------------------------------------------------------------------------------------------------------------------------------------------</span></b></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<span style="background-color: white;"><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;">SQL> </span></i><span style="font-family: 'Times New Roman', serif; font-size: 13.5pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<i><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">col profile_option_value for A20;<o:p></o:p></span></i></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<i><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">col profile_option_id for 999999999;<o:p></o:p></span></i></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<i><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">select PROFILE_OPTION_ID, PROFILE_OPTION_VALUE
from FND_PROFILE_OPTION_VALUES <o:p></o:p></span></i></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<i><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">where profile_option_id in ('<b>4176</b>','3098','3099');<o:p></o:p></span></i></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<span style="background-color: white;"><i><span style="font-family: Arial, sans-serif; font-size: 10pt;">SQL></span></i><span style="font-family: 'Courier New'; font-size: 10pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<span style="background-color: white;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">--------------------------------------------------------------------------------------------------------------------------</span><span style="color: #333333; font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<span style="background-color: white;"><b><span style="color: #333333; font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">Now Update the Status as follows:</span></b><span style="color: #333333; font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<span style="background-color: white;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">--------------------------------------------------------------------------------------------------------------------------</span><span style="color: #333333; font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 5pt;">
<span style="background-color: white;"><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;">SQL> update
FND_PROFILE_OPTION_VALUESset PROFILE_OPTION_VALUE = 'Y' where
PROFILE_OPTION_VALUE = 'N'and PROFILE_OPTION_ID = 4176;</span></i><span style="color: #333333; font-family: "Times New Roman","serif"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 5pt;">
<span style="background-color: white;"><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;">SQL> Commit;</span></i></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 5pt;">
<span style="background-color: white;"><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;">Commit
complete.</span></i><span style="color: #333333; font-family: "Times New Roman","serif"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt; text-align: center;">
<span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">-------------------------------------------------------------------------------------------------------------------------------------------------------------------<b><o:p></o:p></b></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt; text-align: center;">
<b><u><span style="background-color: #fce5cd; color: #333333; font-family: Arial, sans-serif; font-size: 18pt;">** To disable it, just set it to NO again **</span></u></b></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<b style="text-align: center;"><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">-------------------------------------------------------------------------------------------------------------------------------------------------------------------</span></b></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 5pt;">
<span style="background-color: white;"><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;">SELECT
PROFILE_OPTION_ID,PROFILE_OPTION_NAME FROM FND_PROFILE_OPTIONS_VL</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;"><br />
</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;">WHERE START_DATE_ACTIVE <= SYSDATE</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;"><br />
</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;">and NVL(END_DATE_ACTIVE,SYSDATE) >= SYSDATE</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;"><br />
</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;">and ( SITE_ENABLED_FLAG = 'Y' or APP_ENABLED_FLAG = 'Y'</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;"><br />
</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;">or RESP_ENABLED_FLAG = 'Y' or USER_ENABLED_FLAG = 'Y'</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;"><br />
</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;">or SERVER_ENABLED_FLAG = 'Y' or SERVERRESP_ENABLED_FLAG = 'Y'</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;"><br />
</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;">or ORG_ENABLED_FLAG = 'Y')</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;"><br />
</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;">and ( UPPER(USER_PROFILE_OPTION_NAME) LIKE '%FND%DEBUG%'</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;"><br />
</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;">and (USER_PROFILE_OPTION_NAME LIKE '%f%' or
USER_PROFILE_OPTION_NAME LIKE '%F%'))</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;"><br />
</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;">order by user_profile_option_name</span></i><span style="color: #333333; font-family: "Times New Roman","serif"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 5pt;">
<br /></div>
<h6 style="clear: both; color: #333333; line-height: 26px;">
<span style="background-color: white;"><span style="font-family: Lato, sans-serif;"><span style="font-weight: 400;"> <span style="font-size: small;">PROFILE_OPTION_ID PROFILE_OPTION_NAME</span></span></span><span style="font-size: small;"><br /><span style="font-family: Lato, sans-serif;"><span style="font-weight: 400;">—————– ——————-</span><span style="font-weight: normal;"><br /></span></span><strong style="font-family: 'Courier New', Courier, monospace; font-weight: 400;">4176 AFLOG_ENABLED</strong><span style="font-family: 'Courier New', Courier, monospace; font-weight: 400;">3098 AFLOG_FILENAME</span><span style="font-family: 'Courier New', Courier, monospace; font-weight: 400;">3099 AFLOG_LEVEL</span><span style="font-family: 'Courier New', Courier, monospace; font-weight: 400;">8479 AFLOG_BUFFER_MODE</span><span style="font-family: 'Courier New', Courier, monospace; font-weight: 400;">3100 AFLOG_MODULE</span><span style="font-family: 'Courier New', Courier, monospace; font-weight: 400;">8465 DEBUG RULE THRESHOLD</span></span></span></h6>
<div class="MsoNormal" style="line-height: 21.75pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 5pt;">
<span style="background-color: white;"><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;">select
PROFILE_OPTION_ID, PROFILE_OPTION_VALUE from FND_PROFILE_OPTION_VALUES</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;"><br />
</span></i><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;">where profile_option_id in ('<b>4176</b>','3098','3099');</span></i></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 5pt;">
<span style="background-color: white;"><span style="color: #333333; font-family: 'Courier New', Courier, monospace; line-height: 26px;">PROFILE_OPTION_ID PROFILE_OP</span><br style="color: #333333; font-family: 'Courier New', Courier, monospace; line-height: 26px;" /><span style="color: #333333; font-family: 'Courier New', Courier, monospace; line-height: 26px;">—————– ———-</span><br style="color: #333333; font-family: 'Courier New', Courier, monospace; line-height: 26px;" /><span style="color: #333333; font-family: 'Courier New', Courier, monospace; line-height: 26px;">3099 1</span><br style="color: #333333; font-family: 'Courier New', Courier, monospace; line-height: 26px;" /><strong style="color: #333333; font-family: 'Courier New', Courier, monospace; line-height: 26px;">4176</strong><span style="color: #333333; font-family: 'Courier New', Courier, monospace; line-height: 26px;"> </span><strong style="color: #333333; font-family: 'Courier New', Courier, monospace; line-height: 26px;">Y</strong><br style="color: #333333; font-family: 'Courier New', Courier, monospace; line-height: 26px;" /><span style="color: #333333; font-family: 'Courier New', Courier, monospace; line-height: 26px;">3098 NULL</span></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 5pt;">
<span style="background-color: white;"><i><span style="font-family: Arial, sans-serif; font-size: 13.5pt;">SQL> update
FND_PROFILE_OPTION_VALUESset PROFILE_OPTION_VALUE = 'N'where
PROFILE_OPTION_VALUE = 'Y'and PROFILE_OPTION_ID = 4176;</span></i><span style="color: #333333; font-family: "Arial","sans-serif"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman";"> </span><span style="color: #333333; font-family: "Arial","sans-serif"; font-size: 13.5pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";"> <b>=> </b></span><b><span style="font-family: Arial, sans-serif; font-size: 13.5pt;">AFLOG_ENABLED will show
‘N’ now</span></b><span style="color: #333333; font-family: "Times New Roman","serif"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<b><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">I Hope this will definitely help you !!!<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<b style="text-align: center;"><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">-------------------------------------------------------------------------------------------------------------------------------------------------------------------</span></b></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<span style="background-color: white;"><b><span style="font-family: Arial, sans-serif; font-size: 10pt;">-v3nom</span></b><span style="color: #333333; font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 21.75pt; margin-bottom: 0.0001pt;">
<b style="text-align: center;"><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;">-------------------------------------------------------------------------------------------------------------------------------------------------------------------</span></b></div>
<div class="MsoNormal">
<br /></div>
</header></div>
</div>
Prashant Namdeohttp://www.blogger.com/profile/01363618383966360072noreply@blogger.com1tag:blogger.com,1999:blog-5014466644420517902.post-33848487052276078142015-04-26T23:55:00.000+05:302015-04-27T00:04:27.924+05:30VI editor Tips and Tricks<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
vi editor in Linux is the best tool to create / edit a file. It has got more functions then any other Linux Editor (if you don't have access to GUI).</div>
<div style="text-align: left;">
I am trying to keep this post as simple as I can. If you have any doubt or queries please ask.</div>
<div style="text-align: left;">
In this post we will cover some exciting tricks and methods which I bet will be quite effective. </div>
<div style="text-align: left;">
I have categorized them in the following topics.<br />
<ul>
<li><a href="file:///I:/EVOSYS/DOCUMENTS/KB/REFERENCE%20DOCS/Linux/vi_vim%20notes.htm#change">changing text</a></li>
<li><a href="file:///I:/EVOSYS/DOCUMENTS/KB/REFERENCE%20DOCS/Linux/vi_vim%20notes.htm#yank">copying and pasting</a></li>
<li><a href="file:///I:/EVOSYS/DOCUMENTS/KB/REFERENCE%20DOCS/Linux/vi_vim%20notes.htm#delete">deleting</a></li>
<li><a href="file:///I:/EVOSYS/DOCUMENTS/KB/REFERENCE%20DOCS/Linux/vi_vim%20notes.htm#external">external commands</a></li>
<li><a href="file:///I:/EVOSYS/DOCUMENTS/KB/REFERENCE%20DOCS/Linux/vi_vim%20notes.htm#insert">inserting</a></li>
<li><a href="file:///I:/EVOSYS/DOCUMENTS/KB/REFERENCE%20DOCS/Linux/vi_vim%20notes.htm#misc">miscellaneous</a></li>
<li><a href="file:///I:/EVOSYS/DOCUMENTS/KB/REFERENCE%20DOCS/Linux/vi_vim%20notes.htm#move">moving</a></li>
<li><a href="file:///I:/EVOSYS/DOCUMENTS/KB/REFERENCE%20DOCS/Linux/vi_vim%20notes.htm#options">options</a></li>
<li><a href="file:///I:/EVOSYS/DOCUMENTS/KB/REFERENCE%20DOCS/Linux/vi_vim%20notes.htm#search">search and replace</a></li>
</ul>
<a href="https://www.blogger.com/null" name="change"></a>Now lets check them one by one.<br />
<br />
<b>---------------------------------------------------------------------------------------------------------------------</b><br />
<b>changing text</b><br />
<blockquote>
<table border="0" style="width: 100%px;"><tbody>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">cc</span></td><td width="616">change a line</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">C</span></td><td width="616">change from current cursor position to the end-of-line</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">cw</span></td><td width="616">change from current cursor position to the end of the word</td></tr>
<tr valign="top"><td><span class="exambox" style="font-family: 'Courier New', Courier, mono;">J</span></td><td>joins the next line to the current line (inserts a space between the two)</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">gJ</span></td><td width="616">joins the next line to the current line (without a space)</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:12,24j</span></td><td width="616">join lines 12 thru 24, leaving a space between each line.</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">~</span></td><td width="616">switch lower and upper cases</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">r</span></td><td width="616">replace the current character with the next character typed</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">4rx</span></td><td width="616">replace next four characters with "x"</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">R</span></td><td width="616">overwrite until <esc></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">s</span></td><td width="616">substitute the current character and go into insert mode. Same as "<span class="exambox" style="font-family: 'Courier New', Courier, mono;">rxi <ESC></span>"</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">S</span></td><td width="616">substitute the current line, erase it, and go into insert mode, starting at the indentation of the line. Same as "cc"</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">>></span></td><td width="616">shift current line forward</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">3>></span></td><td width="616">shift three lines forward</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">>%</span></td><td width="616">shift all lines until a matching brace or parenthesis</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">>}</span></td><td width="616">shift to the end of the paragraph</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">>'m</span></td><td width="616">shift to the marked line</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;"><<</span></td><td width="616">shift current line backward</td></tr>
<tr valign="top"><td width="20%">vEU</td><td width="616">change from here to end of word to uppercase</td></tr>
<tr valign="top"><td width="20%">vEu</td><td width="616">change from here to end of word to lowercase</td></tr>
</tbody></table>
</blockquote>
<a href="https://www.blogger.com/null" name="yank"></a><br />
<b>--------------------------------------------------------------------------------------------------------------------</b><br />
<b>copying and pasting (We call yanking for Copying anything in Linux)</b><br />
<blockquote>
<table border="0" style="width: 100%px;"><tbody>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">yl</span></td><td width="79%">yank (copy) current character</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">yn</span></td><td width="79%">yank n characters</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">yw</span></td><td width="79%">yank the current word</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">yy</span></td><td width="79%">yank the current line</td></tr>
<tr valign="top"><td width="20%">Y</td><td width="79%">yank a line, same as "yy"</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">nyy</span></td><td width="79%">yank n lines of text</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">y$</span></td><td width="79%">yank to end of line</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">y)</span></td><td width="79%">yank to the end of the sentence</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">y'x</span></td><td width="79%">yank from current line to the mark <span class="exambox" style="font-family: 'Courier New', Courier, mono;">x</span> (use <span class="exambox" style="font-family: 'Courier New', Courier, mono;">mx</span> to mark as <span class="exambox" style="font-family: 'Courier New', Courier, mono;">x</span>)</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">y/word</span></td><td width="79%">yank from current position to "word"</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">"ay'm</span></td><td width="79%">yank from here to the mark. Place this into the named buffer "a". This will also allow one to switch files using the ":e fn" or ":n fn" command and then place the buffer back.</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">"ayy</span></td><td width="79%">yank current line into buffer a.</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">"a3Y</span></td><td width="79%">yank three lines, place into buffer "a"</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">"A3Y</span></td><td width="79%">append 3 lines, place into "a". This allows one to build up a buffer.</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">"ap</span></td><td width="79%">paste the contents of "a" back, below current line.</td></tr>
<tr valign="top"><td height="41"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">"zyy<br />@z</span></td><td height="41"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">"zyy</span> places the highlighted text into buffer <span class="exambox" style="font-family: 'Courier New', Courier, mono;">z</span>; <span class="exambox" style="font-family: 'Courier New', Courier, mono;">@z</span> will run the contents of buffer <span class="exambox" style="font-family: 'Courier New', Courier, mono;">z</span>. This allows a search pattern to be written in the document and then reused.</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">p</span></td><td width="79%">paste to the right of the cursor</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">P</span></td><td width="79%">paste to the left of the cursor</td></tr>
</tbody></table>
</blockquote>
<b>---------------------------------------------------------------------------------------------------------------------</b><br />
<b>deleting</b><br />
<blockquote>
<table border="0" style="width: 100%px;"><tbody>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">x</span></td><td width="485">delete the character under the cursor<span class="exambox" style="font-family: 'Courier New', Courier, mono;"></span></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">dd</span></td><td width="485">delete the current line</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">d^</span></td><td width="485">delete from current cursor position to the beginning of the line</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">d$</span></td><td width="485">delete from current cursor position to the end of the line</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">dw</span></td><td width="485">delete from current cursor position to the end of the word</td></tr>
<tr valign="top"><td width="20%">d3w</td><td width="485">delete three words</td></tr>
<tr valign="top"><td><span class="exambox" style="font-family: 'Courier New', Courier, mono;">3dd</span></td><td>delete three lines</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">d/word</span></td><td width="485">delete until you find <span class="exambox" style="font-family: 'Courier New', Courier, mono;">word</span></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">dfx</span></td><td width="485">delete from here until the character "x"</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">D</span></td><td width="485">delete everything to the end of the current line (same as <span class="exambox" style="font-family: 'Courier New', Courier, mono;">d$</span>)</td></tr>
<tr valign="top"><td><span class="exambox" style="font-family: 'Courier New', Courier, mono;">3dd</span></td><td>delete everything to the end of the current line and the following 2 lines</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">u</span></td><td width="485">undo deletion</td></tr>
<tr valign="top"><td width="20%">U</td><td width="485">undo the line you just changed</td></tr>
</tbody></table>
</blockquote>
<a href="https://www.blogger.com/null" name="insert"></a><br />
<b>---------------------------------------------------------------------------------------------------------------------</b><br />
<b>inserting</b><br />
<blockquote>
<table border="0" style="width: 100%px;"><tbody>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">i</span></td><td width="469">insert at the current character</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">I</span></td><td width="469">insert at the beginning of the current line<span class="exambox" style="font-family: 'Courier New', Courier, mono;"></span></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">20i- <ESC></span></td><td width="469">insert 20 dashes (-)</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">a</span></td><td width="469">append to the right of the current character<span class="exambox" style="font-family: 'Courier New', Courier, mono;"></span></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">A</span></td><td width="469">append at the end of the current line<span class="exambox" style="font-family: 'Courier New', Courier, mono;"></span></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">o</span></td><td width="469">insert a new line immediately following the current line<span class="exambox" style="font-family: 'Courier New', Courier, mono;"></span></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">O</span></td><td width="469">insert a new line immediately before the current line</td></tr>
</tbody></table>
</blockquote>
<a href="https://www.blogger.com/null" name="move"></a><br />
<b>---------------------------------------------------------------------------------------------------------------------</b><br />
<b>moving</b><br />
<blockquote>
<table border="0" style="width: 100%px;"><tbody>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">h</span></td><td width="484">move the cursor one character to the left</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">j</span></td><td width="484">move the cursor one character down</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">k</span></td><td width="484">move the cursor one character up</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">l</span></td><td width="484">move the cursor one character to the right</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">0</span></td><td width="484">move cursor to the beginning of the current line</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">$</span></td><td width="484">move cursor to the end of the current line</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">w</span></td><td width="484">move cursor forward a word</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">3w</span></td><td width="484">move cursor forward three words</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">W</span></td><td width="484">move cursor forward, ignoring punctuation</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">b</span></td><td width="484">move cursor back a word</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">B</span></td><td width="484">move cursor back a word, ignoring punctuation</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">e</span></td><td width="484">move cursor to the end of the word</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">E</span></td><td width="484">move cursor to the end of the word, ignoring punctuation</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">G</span></td><td width="484">move cursor to the last line of the file</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">nG</span></td><td width="484">move cursor to the beginning of line n</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">1G</span></td><td width="484">move to the first line of a file</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">n|</span></td><td width="484">moves the cursor to the beginning of column n</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">f</span></td><td width="484">find a character in the line, forward</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">fa</span></td><td width="484">find the character "a" in the line, forward</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">2fa</span></td><td width="484">find the second occurrence of "a" in the line, forward</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">F</span></td><td width="484">find a character in the line, backward</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">Fz</span></td><td width="484">find the character "z" in the line, backward</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">t</span></td><td width="484">find up to a character in the line, forward</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">)</span></td><td width="484">jump to the next sentence</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">}</span></td><td width="484">jump to the next paragraph</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">]</span></td><td width="484">jump to the next section</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">%</span></td><td width="76%">find matching brace or parenthesis</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">^b</span></td><td width="484">scroll backwards one page. A count scrolls that many pages</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">^f</span></td><td width="484">scroll forwards one page. A count scrolls that many pages</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">^u</span></td><td width="484">scroll up half a screen</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">^d</span></td><td width="484">scroll down half a screen</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">z <enter></span></td><td width="484">put current line at top of screen</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">z.</span></td><td width="484">put current line at middle of screen</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">z-</span></td><td width="484">put current line at bottom of screen</td></tr>
<tr valign="top"><td height="23" width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">m</span></td><td height="23" width="484">start a mark, the next character is the name, any character from a-z</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">ma</span></td><td width="484">mark this spot with the character "a"</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">'a</span></td><td width="484">return to the line marked "a"</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">`a</span></td><td width="484">return to the character marked "a"</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">''</span></td><td width="484">return to previous line (auto-mark)</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">``</span></td><td width="484">return to previous character (auto-mark)</td></tr>
</tbody></table>
</blockquote>
<blockquote>
<a href="https://www.blogger.com/null" name="search"></a></blockquote>
<b>---------------------------------------------------------------------------------------------------------------------</b><br />
<b>search and replace</b><br />
<blockquote>
<table border="0" style="width: 100%px;"><tbody>
<tr valign="top"><td height="23" width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">/word</span></td><td height="23" width="77%">search forward for <span class="example" style="font-family: 'Courier New', Courier, mono;">word</span></td></tr>
<tr valign="top"><td><span class="exambox" style="font-family: 'Courier New', Courier, mono;">?word</span></td><td>search backward for <span class="example" style="font-family: 'Courier New', Courier, mono;">word</span></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">?word?z.</span></td><td width="77%"><pre>search forward for <span class="example" style="font-family: 'Courier New', Courier, mono;">word</span>, put line at the middle of screen</pre>
</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">n</span></td><td width="77%">jump forward to next occurance of word</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">N</span></td><td width="77%">jump backward to next occurance of word</td></tr>
<tr valign="top"><td height="23" width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">*</span></td><td height="23" width="77%">search forward for word under cursor <b>(vim)</b></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">#</span></td><td width="77%">search backward for word under cursor <b>(vim)</b></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">g*</span></td><td width="77%">search forward for word under cursor (partial match) <b>(vim)</b></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">g#</span></td><td width="77%">search backward for word under cursor (partial match) <b>(vim)</b></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:noh</span></td><td width="77%">stop highlighting the word that was searched for</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:s/old/new/</span></td><td width="77%">replaces first occurence of <span class="example" style="font-family: 'Courier New', Courier, mono;">old</span> with <span class="example" style="font-family: 'Courier New', Courier, mono;">new</span> on current line</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:s/old/new/g</span></td><td width="77%">globally replaces <span class="example" style="font-family: 'Courier New', Courier, mono;">old</span> with <span class="example" style="font-family: 'Courier New', Courier, mono;">new</span> on current line</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:%s/old/new/g</span></td><td width="77%">globally replaces <span class="example" style="font-family: 'Courier New', Courier, mono;">old</span> with <span class="example" style="font-family: 'Courier New', Courier, mono;">new</span> on all lines</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:s/old/new/gc</span></td><td width="77%">confirms replacements</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:%s/^V^M//g</span></td><td width="77%">globally remove DOS carriage returns</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:%s/,/^V^M/g</span></td><td width="77%">globally replace commas with newlines (yes, I know this looks like it would insert DOS carriage returns, but it only inserts the newlines on Unix)</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:%s/\s*$//</span></td><td width="77%">strip blanks from end of lines</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:%s/^.\{30}//</span></td><td width="77%">remove the first 30 characters from each line</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:%s/[ ^I]*$/!d</span></td><td width="77%">remove trailing whitespace (where <span class="exambox" style="font-family: 'Courier New', Courier, mono;">^I</span> is produced by pressing the tab key)</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:%s/.*/\L&/</span></td><td width="77%">convert the entire file to lowercase.</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:s/.*/\u&/</span></td><td width="77%">convert the first character of line to uppercase.</td></tr>
<tr valign="top"><td height="104" width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:%s/\<./\u&/g</span></td><td height="104" width="77%">convert the first character of each word to uppercase<br />
<blockquote>
<span class="exambox" style="font-family: 'Courier New', Courier, mono;">\<</span> matches the start of a word;<br />
<span class="exambox" style="font-family: 'Courier New', Courier, mono;">.</span> therefore matches the first character of a word;<br />
<span class="exambox" style="font-family: 'Courier New', Courier, mono;">\u</span> tells Vi(m) to uppercase the next character in the substitution string;<br />
<span class="exambox" style="font-family: 'Courier New', Courier, mono;">&</span> means substitute whatever was matched on the lhs;</blockquote>
</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:s/book{./\L&/</span></td><td width="77%">convert the first character after the { to lowercase.</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:'x,.s/\([a-z]\)=/\1 =/</span></td><td width="77%">replace any lowercase character in the alphabet followed by an equal sign with the same character followed by a space and an equal sign, e.g., book= >> book =</td></tr>
<tr valign="top"><td width="20%">:<span class="exambox" style="font-family: 'Courier New', Courier, mono;">:%s/\(That\) or \(this\)/\2 or \1/</span></td><td width="77%">change "that or this" to "this or that"</td></tr>
<tr valign="top"><td width="20%">:<span class="exambox" style="font-family: 'Courier New', Courier, mono;">:%s/\(^\\foilhead{\(.*\)}\)/<br />%\1^M\\section{\2}/</span></td><td width="77%">comment out each line beginning with '\foilhead' and replace with a line beginning with '\section'; note the nested backreferences for keeping the rest of the line the same</td></tr>
<tr valign="top"><td width="20%">:<span class="exambox" style="font-family: 'Courier New', Courier, mono;">:%s/\(.*\)/<a href="\1">\1<\/a>/</span></td><td width="77%">add HTML tags for references to files</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:s/ \(\d\{1,2}\)\.\(\d\{1,2}\)\(.*\)/<a href="\1-\2.sh">\1.\2\3<\/a></span></td><td width="77%">change a line of the form<br />
<span class="exambox" style="font-family: 'Courier New', Courier, mono;"> 1.1 Accessing Substring</span><br />
to<br />
<span class="exambox" style="font-family: 'Courier New', Courier, mono;"> <a href="1-1.sh">1.1 Accessing Substrings</a></span></td></tr>
<tr valign="top"><td width="20%"><div class="exambox" style="font-family: 'Courier New', Courier, mono;">
:'x,.s:^\([^ ]\+\) \(.*\):<br />
<\1>\1 \2<\/\1><br>:</div>
</td><td width="77%">change a line of the form<br />
<span class="exambox" style="font-family: 'Courier New', Courier, mono;"> KBD used for text to be typed by the user</span><br />
to<br />
<span class="exambox" style="font-family: 'Courier New', Courier, mono;"> <KBD>KBD used for text to be typed by the user</KBD><br></span><br />
Colons are used here instead of the usual slashes for separating the 'find' and 'replace' parts. The part <span class="exambox" style="font-family: 'Courier New', Courier, mono;">^\([^ ]\+\)</span> finds all of the characters up to the first space and saves them for use in the 'replace' part as <span class="exambox" style="font-family: 'Courier New', Courier, mono;">\1</span>.</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:'x,.s/^/#/</span></td><td width="77%">insert a pound sign (#) at the beginning of the line from the line marked with mx to the current line</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:%s/word1\nword2//</span></td><td width="77%">remove <span class="exambox" style="font-family: 'Courier New', Courier, mono;">word1</span> from the end of a line and <span class="exambox" style="font-family: 'Courier New', Courier, mono;">word2</span> from the beginning of the next line; <span class="exambox" style="font-family: 'Courier New', Courier, mono;">\n</span> represents the newline between the two</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:&</span></td><td width="77%">repeat previous substitution</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:<up arrow></span></td><td width="77%">recall : history</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:g/string/d</span></td><td width="77%">deletes every line that contains <span class="example" style="font-family: 'Courier New', Courier, mono;">string</span></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:g/\.c/+|s/^/\.cc/</span></td><td width="77%">look for all ".c" commands, jump to next line, substitute the beginning of line with ".cc".</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:g/^\..*/|s//\U&/</span></td><td width="77%">convert all characters at beginning of line that start with a "." to upper case.</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:v/string/d</span></td><td width="77%">deletes every line that does not contain <span class="example" style="font-family: 'Courier New', Courier, mono;">string</span></td></tr>
<tr valign="top"><td height="44" width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:g/.*/m0</span></td><td height="44" width="77%">This will reverse the order of the lines in the current file. m0 is the ex command to move the line to line 0.</td></tr>
<tr valign="top"><td height="23" width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:v/./d or :g/^$/d</span></td><td height="23" width="77%">Remove all blank lines.</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:g/^\s*$/d</span></td><td width="77%">Removes all lines that only have whitespace.</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:v/./.,/./-1join</span></td><td width="77%">Replaces multiple blank lines with just one blank line.</td></tr>
</tbody></table>
</blockquote>
<a href="https://www.blogger.com/null" name="options"></a><br />
<b>---------------------------------------------------------------------------------------------------------------------</b><br />
<b>options</b><br />
<blockquote>
<table border="0" style="width: 100%px;"><tbody>
<tr valign="top"><td valign="top" width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:se ai</span></td><td valign="top" width="58%">autoindent (unset with <span class="exambox" style="font-family: 'Courier New', Courier, mono;">:se noai</span>)</td></tr>
<tr valign="top"><td valign="top" width="20%"><a href="http://www.vi-improved.org/wiki/index.php/FileFormat"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:se ff=unix</span></a></td><td valign="top" width="67%">set fileformat to unix</td></tr>
<tr valign="top"><td valign="top" width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:se ic</span></td><td valign="top" width="67%">ignore case when searching.</td></tr>
<tr valign="top"><td height="26" width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:se list</span></td><td height="26" width="76%">display tabs and carriage returns</td></tr>
<tr><td valign="top" width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:se nu</span></td><td valign="top">display line numbers in the file. They are not actually in the file. (unset with <span class="exambox" style="font-family: 'Courier New', Courier, mono;">:se nonu</span>)</td></tr>
<tr valign="top"><td valign="top" width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:se sm</span></td><td valign="top" width="58%">show matching brace or parenthesis while inserting</td></tr>
<tr valign="top"><td valign="top" width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:se smd</span></td><td valign="top" width="58%">display the mode</td></tr>
<tr valign="top"><td valign="top" width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:se sw=2</span></td><td valign="top" width="67%">set shifting to 2 spaces</td></tr>
<tr valign="top"><td valign="top" width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:se tabstop=4</span></td><td valign="top" width="67%">set tabs to 4 spaces</td></tr>
<tr valign="top"><td height="26" width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">^^D</span></td><td height="26" width="76%">turn off autoindent for current line, resume same place for the next line (up carrot and control-D)</td></tr>
<tr valign="top"><td height="23" width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">0^D</span></td><td height="23" width="76%">reset the autoindent, start at the left margin</td></tr>
</tbody></table>
</blockquote>
<a href="https://www.blogger.com/null" name="external"></a><br />
<b>---------------------------------------------------------------------------------------------------------------------</b><br />
<b>external commands</b><br />
<blockquote>
<table border="0" style="width: 100%px;"><tbody>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">!cmd</span></td><td width="75%">execute an external program</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">!!cmd</span></td><td width="75%">execute an external program, replacing the output with the results</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">!$</span></td><td width="75%">send from here to the end-of-line</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">!L</span></td><td width="75%">send from here to the last line of screen</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">!23G</span></td><td width="75%">send from here to line 23</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">!/word</span></td><td width="75%">send from here until you find "word"</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">!)</span></td><td width="75%">send from here until the next sentence</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">!}</span></td><td width="75%">send from here until the next paragraph</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">!!date</span></td><td width="75%">adds the date</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">!!cut -c41-</span></td><td width="79%">cut the first 40 characters from a file</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">3!!sort</span></td><td width="75%">send three lines to <span class="exambox" style="font-family: 'Courier New', Courier, mono;">sort</span>, and return the output</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">!Grev</span></td><td width="75%">send from here to the end of file to the "<span class="exambox" style="font-family: 'Courier New', Courier, mono;">rev</span>" command; the results will reverse the characters in each line</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">!}sort</span></td><td width="75%">sends from the current line until the first blank line to <span class="exambox" style="font-family: 'Courier New', Courier, mono;">sort</span></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:'x,.!sort</span></td><td width="75%">will sort from the line marked with mx to the current line</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:r !ll</span></td><td width="75%">read the output of an "<span class="exambox" style="font-family: 'Courier New', Courier, mono;">ll</span>" command, and put it after the current line.</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:'t,'b !spell</span></td><td width="75%">check spelling from mark <span class="exambox" style="font-family: 'Courier New', Courier, mono;">t</span> to mark <span class="exambox" style="font-family: 'Courier New', Courier, mono;">b</span></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:'t,. !awk '{print $3 " " $2 " " $1}'</span></td><td width="75%">reverse the order of three columns</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:%! sed G</span></td><td width="75%">double space the entire file.</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:1,5! sed G</span></td><td width="75%">double space the lines from 1-5</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:'x,.!sed '/^$/d'</span></td><td width="75%">remove the blank lines from mark <span class="exambox" style="font-family: 'Courier New', Courier, mono;">x</span> to the current line</td></tr>
</tbody></table>
</blockquote>
<a href="https://www.blogger.com/null" name="misc"></a><br />
<b>---------------------------------------------------------------------------------------------------------------------</b><br />
<b><br /></b>
<b>miscellaneous</b><br />
<a href="https://www.blogger.com/null" name="delete"></a><span style="background-color: white;"></span><br />
<blockquote>
<table border="0" style="width: 100%px;"><tbody>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">^g</span></td><td width="77%">give file name, status, current line number and relative position</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">^l</span></td><td width="77%">refresh the screen (sometimes `<span class="example" style="font-family: 'Courier New', Courier, mono;">^P</span>' or `<span class="example" style="font-family: 'Courier New', Courier, mono;">^R</span>')</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">^v</span></td><td width="77%">visual mode. in Windows, <span class="example" style="font-family: 'Courier New', Courier, mono;">Ctrl-v</span> is mapped to paste text. Use <span class="example" style="font-family: 'Courier New', Courier, mono;">Ctrl-q</span> instead <b>(vim)</b></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">.</span></td><td width="77%">repeat latest command</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">&</span></td><td width="77%">repeat latest `ex' substitute command, e.g. <span class="example" style="font-family: 'Courier New', Courier, mono;">:s/wrong/good/</span></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:ab lg longer</span></td><td width="77%">create an abbreviation. Whenever <span class="exambox" style="font-family: 'Courier New', Courier, mono;">lg</span> is typed, it will be replaced with <span class="exambox" style="font-family: 'Courier New', Courier, mono;">longer</span>.</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">vi +/string filename</span></td><td width="77%">start vi, jumping to the first occurrence of <span class="example" style="font-family: 'Courier New', Courier, mono;">string</span></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">vi -r filename</span></td><td width="77%">recovers an open file after a crash</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">vi `cat somefile`</span></td><td width="77%">open a list of files that are in the file <span class="exambox" style="font-family: 'Courier New', Courier, mono;">somefile</span></td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:r filename</span></td><td width="77%">insert file <span class="exambox" style="font-family: 'Courier New', Courier, mono;">filename</span>, placing its contents after current line</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:1,4w filename</span></td><td width="77%">write lines 1 through 4 to filename</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:e filename</span></td><td width="77%">edit filename</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:f filename</span></td><td width="77%">change current file name to filename</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:n</span></td><td width="77%">edit next file</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:sh</span></td><td width="77%">call up the shell, run commands until a ^d (CONTROL-d), then return to editing</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:vi</span></td><td width="77%">VI MODE. Used if "Q" is pressed, or called up ex, and now wish to use the visual mode</td></tr>
<tr valign="top"><td height="13" width="20%"></td><td height="13" width="77%">In Insert mode, press the <span class="example" style="font-family: 'Courier New', Courier, mono;">Ctrl-p</span> or <span class="example" style="font-family: 'Courier New', Courier, mono;">Ctrl-n</span> key to complete part of a word that has been typed. This is useful for entering function names.</td></tr>
<tr valign="top"><td width="20%"><span class="exambox" style="font-family: 'Courier New', Courier, mono;">:<up arrow></span></td><td width="77%">recall : history</td></tr>
</tbody></table>
</blockquote>
----------------------------------------------------------------------------------------------------------------------<br />
<b style="text-decoration: underline;">References:</b><br />
<ol>
<li><a href="http://www.cat.pdx.edu/unix/vi-fast-reference-guide.html">vi Fast Reference Guide</a> — the motherload of vi commands</li>
<li><a href="http://www.vim.org/htmldoc/starting.html">Vim documentation: starting</a></li>
<li><a href="http://www.samspublishing.com/title/0735710015">Vi IMproved — VIM</a></li>
<li><a href="http://www.rayninfo.co.uk/vimtips.html">Best of VIM Tips</a></li>
</ol>
----------------------------------------------------------------------------------------------------------------------<br />
<br />
<br /></div>
</div>
Prashant Namdeohttp://www.blogger.com/profile/01363618383966360072noreply@blogger.com0Pune, Maharashtra, India18.516074596589366 73.8583374023437518.275180096589366 73.535613902343755 18.756969096589366 74.181060902343745tag:blogger.com,1999:blog-5014466644420517902.post-46840638853217960082015-01-04T04:07:00.001+05:302015-01-04T04:14:48.086+05:30Commitment towards the Life...! The Work-life balance.<div dir="ltr" style="text-align: left;" trbidi="on">
Today's post is about the life a DBA and every other person must commit to.<br />
<br />
From my past experiences I can say that, the life of a DBA can be very enjoyable one, if we follow some rules and be under our boundaries.<br />
To be something, you have to keep hold on somethings, you have to keep somethings ON HOLD until you achieve your desired goal. You may need to work hard, or work smart to deal with your personal and professional life. One of my friend <b><u>Aniket</u></b> (Professional Network Engg.), his experiences and my thoughts helped me to come up with some of these points. So lets get started with these points.<br />
<br />
These are the Points we shall always keep in Mind while working:<br />
<br />
<b><u><span style="color: blue;">1. Self Confidence</span></u></b><br />
<br />
Its the term what everyone writes in his/her resume. But the fact is only 20% people follow this rule sincerely. When it comes to compromise the work with your personal life, most people go with the flow of their personal matters. Personal matters drives you, but also they affect your professional life and your career growth.<br />
What I say is just not to commit anything in your personal life unless you achieve your professional goal what you desire for. And that will absolutely make you achieve your professional goal, and I bet it will make you work for your personal goal. So just <u style="font-weight: bold;">SHOW</u> <u style="font-weight: bold;">confidence</u> while you are working. Always achieve whatever comes in your way.<br />
<br />
<br />
<b><u><span style="color: blue;">2. Be Ambitious</span></u></b><br />
<br />
Always try to do something more. What so ever you can do, to make it better!<br />
Try to excel in your field. This statement is small, but when it comes to your work, you may think of lot many things and ultimately you see a bigger problem, as your field is vast.<br />
So now what I suggest is, to start with you <b>current task</b>, and keep on digging it up. FULL STOP. Just keep on digging the enhancement you can make. I know it may take time, but you will get atleast an hour to think about it apart from your regular routine, and if not, just spend 10 Mins to think about it, just jot down every single possibility you can come up with.<br />
<br />
One of the Saying, that keeps me motivated is<span style="color: #990000;"> <b><u>"Try to break your own record everyday"</u></b></span>. I personally follow this.<br />
<br />
<br />
<b><u><span style="color: blue;">3. Self Respect</span></u></b><br />
<br />
This term can be taken it two ways, one which will led you to right way, and another that will led to be arrogant and selfish.<br />
<br />
I would say, that you must keep your ego aside if and only if you want to be successful. Now, lets come to the point.<br />
<br />
Self Respect, to respect ourselves. To respect what you do, To respect what you did, and to respect what you can/will do.<br />
<br />
<b><u><span style="color: #990000;">Be responsible for your deeds</span></u></b>, Whatever decision you make, just make sure, that it will be true in all the cases. And its <b><u>NOT BAD</u></b> if you are proved wrong in some of them, just correct them and make changes. Don't be shy, just be <b>confident.</b><br />
<br />
<br />
<b><u><span style="color: blue;">4. Take Opinion</span></u></b><br />
<br />
It is always advisable to take opinion from your seniors, even if you think he is not correct. Just take opinion. Then research and act upon.<br />
If it feels like you are asking something stupid, <b>still ask, <span style="color: #990000;">ASK FOR MORE.</span></b> And you may get something extra out of it.<br />
Whatever the front personal think about that topic, you will get a view. Take opinions and make your decisions wisely.<br />
<br />
<br />
<b><u><span style="color: blue;">5. Believe in Yourself.</span></u></b><br />
<br />
Every human in this world, is here because he is important to play his/her role. You can be right or wrong for every individual. It always depends upon the perspective you hold. If you are low to take it, then you will lose, and if you are confident then you will achieve it.<br />
<br />
This point is most important and dependent upon all the points stated above. While making decisions, always think in both ways, about its adverse and its positive effects.<br />
If you master you technology, and above given points of life. You will certainly make decision which will be good for you, and for your surrounding.<br />
And everyone looks for a better environment to work in. <b><span style="color: #990000;"><u>So why not make one</u></span></b>. Make it yourself.<br />
<br />
<br />
<br />
That's all for today.<br />
The Better You, the Better will be your environment.<br />
-V3nom<br />
<br />
<br /></div>
Prashant Namdeohttp://www.blogger.com/profile/01363618383966360072noreply@blogger.com0tag:blogger.com,1999:blog-5014466644420517902.post-63661707741257738032014-12-29T01:43:00.002+05:302014-12-29T01:50:09.730+05:30Why Shall I be a DBA???<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
This post is mainly for the Freshers and for the beginners in the field of Database.....</div>
<div>
<br /></div>
<div>
Task of DBA is equivalent to the Events in life of an individual.</div>
<div>
<br /></div>
<div>
For the freshers, this is my first question. Why you want to be a DBA?</div>
<div>
<br /></div>
<div>
Well this has been asked to me several times, from my friends and from the interviewers...</div>
<div>
<br /></div>
<div>
Well for me, I just wanted a job, as I was fresher in IT field. Later when I was going thought the Oracle DBA Course, I understood what RDBMS is, and what's it importance. Well simply in a sentence I will explain it. "It's the record of Data, action or reaction you give while you are on the internet." Let's take an example:</div>
<div>
<i>"Beginning from the world famous site GOOGLE, whatever you browse, search, everything is recorded in the GOOGLE database."</i></div>
<div>
<br /></div>
<div>
Well if you are bored enough reading this,,,,, Lets come to the point.</div>
<div>
<br /></div>
<div>
Database is the record of each and every transaction, and DBA is a person who holds the key to preserve this data. This data can be important to anyone, to GOOGLE or any other client.</div>
<div>
<br /></div>
<div>
But, to be a DBA, you need certain things, Lets keep these points in mind:</div>
<div>
<br /></div>
<div>
1. <b>Be Focused</b>, Just concentrate on the <b>GOAL </b>(This is an important thing which you must concentrate throughout you life )</div>
<div>
<div>
<br /></div>
</div>
<div>
2. <b>Be Responsible </b>(Take ownership of task, take everything seiously)</div>
<div>
<br /></div>
<div>
3. <b>Time </b>(Give time, and try to reduce the time to resolve every problem)</div>
<div>
<br /></div>
<div>
4. <b>Be Truthful </b>(Never, never, never lie in your life, as you will be caught anyhow, if anyone wants to.)</div>
<div>
<br /></div>
<div>
5. Don't Panic (Take everything seriously, but don't panic, Decide what you wants to do, Make an Action Plan and estimate the time and ask for 1.5 times the decided time, so that if any problem comes in between, then you must be able to resolve it anyhow ;) )</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
That's all for today. Just keep this in mind.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
-Next post will be the starting of the DBA course right from the beginning... and that will be free of cost. And that will be in sequence.</div>
<div>
<br /></div>
<div>
<br />
All your doubts and questions will be answered timely.</div>
<div>
<br /></div>
<div>
Thanks Folks,</div>
<div>
-Venom (That's What My Screen Name is)</div>
</div>
Prashant Namdeohttp://www.blogger.com/profile/01363618383966360072noreply@blogger.com0tag:blogger.com,1999:blog-5014466644420517902.post-81065599991406965762014-12-16T22:32:00.004+05:302014-12-16T22:37:25.004+05:30Something about Rapid Cloning Part 1 - Database<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">During the interviews this is always asked, like "Tell me how do you do the Cloning in R12?"</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">We all know what happens in Cloning, but now we shall also know how is it done internally.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">So I thought I shall dig up some information about how oracle works, whats the idea behind.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Starting with the few basic statements that we might have heard alot. I will put them in a question/answer pattern. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: red;">In this post I am focusing only on the Database part.</span> </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<br />
<div class="MsoNormal">
<span lang="EN" style="font-size: 12pt; line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;"><b><span style="color: blue;">Q: Why do we need
to do cloning?</span></b><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span lang="EN"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-size: 12pt; line-height: 115%;">-> To test some
application by patching or coding which can affect the whole application or may
need downtime for the process to be carried out. So, in order to avoid the loss
in </span><span style="line-height: 18.3999996185303px;">business</span><span style="font-size: 12pt; line-height: 115%;"> due to these mentioned factors, we need to clone the Oracle Application.<o:p></o:p></span></span></span></div>
<div class="MsoNormal">
<span lang="EN" style="font-size: 12pt; line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span></div>
<div class="MsoNormal">
<b style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; line-height: 115%;"><span style="color: blue;">Q. What are the
different cloning methods supported by Oracle?</span></b></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span lang="EN" style="font-size: 12pt;">-> There can be many cloning
methods but oracle supports only 1, i.e., RAPID CLONE.<br />
On the basis of Config. We can divide them as <br />
1. With AUTOCONFIG.
(Completely replaced by Rapid Clone now.)<br />
2. Without AUTOCONFIG. (</span><span style="font-size: 12pt;">used before
11.5.5</span><span lang="EN" style="font-size: 12pt;">)</span></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<b style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt;"><br /></b></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<b style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt;"><span style="color: blue;">Q. What is the need to run adpreclone?</span></b></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span lang="EN" style="font-size: 12pt;">-> T</span><span style="font-size: 12pt;">his will create
the staged clone directory which will be having the <b>driver files </b>and
<b>configuration file (XML File) </b>of the source.<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span lang="EN" style="font-size: 12pt;"><span style="font-family: Arial, Helvetica, sans-serif;"><b><br /></b></span></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span lang="EN" style="font-size: 12pt;"><span style="font-family: Arial, Helvetica, sans-serif;"><b><span style="color: blue;">Q: How does adpreclone.pl
dbTier will run</span></b><o:p></o:p></span></span></div>
<br />
<div class="MsoNormal" style="margin: 5pt 0in;">
<span lang="EN" style="font-size: 12pt;"><span style="font-family: Arial, Helvetica, sans-serif;">-> After runnning this, it will go in two
stages<br />
1.
dbTechStack 2.
Database<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span lang="EN" style="font-size: 12pt;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span lang="EN" style="font-size: 12pt;"><span style="font-family: Arial, Helvetica, sans-serif;"><b><span style="color: blue;">Q: Explain dbTechStack and
Database in details:</span></b><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span lang="EN" style="font-size: 12pt;">-> </span><span style="font-size: 12pt;">It will create
stage cloned area at $ORACLE_HOME/appsutil/clone This clone directory has got
following main directories<br />
data,jre,bin,db,html,context<br />
This will prepare the database techstack at dbTechStack stage. <o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span style="font-family: Arial, Helvetica, sans-serif;"><b><span style="font-size: 12pt;"> 1. Creates
template files at </span></b><span style="font-size: 12pt;">$ORACLE_HOME/appsutil/template<br /><b> 2. Creates driver files at </b>$ORACLE_HOME/appsutil/driver/instconf.drv<br /> <b>3.</b> <b>Converts</b> inventory from binary to xml</span></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span style="color: blue;"><b style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt;">Now
the database stage:</b></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span style="font-size: 12pt;"><span style="font-family: Arial, Helvetica, sans-serif;"> It
will prepare database at the database stage. Major activities includes</span></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<b style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt;"> <u>1. Create database control file script</u></b></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span style="font-size: 12pt;"><span style="font-family: Arial, Helvetica, sans-serif;"> $ORACLE_HOME/appsutil/clone/context/data/stage/addbhomsrc.xml<br /> $ORACLE_HOME/appsutil/clone/context/data/stage/adcrdb.zip<br /> adcrdbclone.sql<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span style="font-family: Arial, Helvetica, sans-serif;"><b><span style="font-size: 12pt;"><br /></span></b></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span style="font-family: Arial, Helvetica, sans-serif;"><b><span style="font-size: 12pt;"> <u>2. Generates
database creation driver file</u></span></b><span style="font-size: 12pt;"><br />
$ORACLE_HOME/appsutil/clone/context/data/driver/data.drv<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-size: 12pt;"><br /></span></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span style="font-family: Arial, Helvetica, sans-serif;"><b><span style="font-size: 12pt;"><u> 3. Copy
JDBC Libraries</u><br />
</span></b><span style="font-size: 12pt;">$ORACLE_HOME/appsutil/clone
/clone/jlib/classes111.zip<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<br /></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span lang="EN" style="font-size: 12pt;"><span style="font-family: Arial, Helvetica, sans-serif;">________________________________________ </span></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<b><span lang="EN" style="font-size: 12pt;"><span style="font-family: Arial, Helvetica, sans-serif;"><u><span style="color: blue;">NOW adcfgclone.pl dbTier (On TARGET NODE)</span></u><o:p></o:p></span></span></b></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<br /></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span lang="EN" style="font-size: 12pt;"><span style="font-family: Arial, Helvetica, sans-serif;">This will also run in two
modes</span></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; text-indent: 0in;"> <u><b>1. dbTechStack stage: </b></u></span></div>
<div class="MsoNormal" style="margin: 5pt 0in 5pt 0.25in; text-indent: 0in;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span lang="EN" style="font-size: 12pt;">
It will make use template and driver files which were created during preclone
process. And it will run the following scripts<br />
adchkutl.sh<br />
adclonectx.sh<br />
runInstallConfigDriver - </span><span style="font-size: 12pt;">located in $ORACLE_HOME/appsutil/driver/instconf.drv<br />
Relinking of
ORACLE_HOME/appsutil/install/adlnkoh.sh <o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span lang="EN" style="font-size: 12pt;"><span style="font-family: Arial, Helvetica, sans-serif;">
</span></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span lang="EN" style="font-size: 12pt;"><span style="font-family: Arial, Helvetica, sans-serif;"> <b><u>2. Now for the Database Stage</u></b></span></span></div>
<div class="MsoNormal" style="margin: 5pt 0in;">
<span lang="EN" style="font-size: 12pt;"><span style="font-family: Arial, Helvetica, sans-serif;">
Driver File $ORACLE_HOME/appsutil/clone/context/data/driver/data.drv<br />
Create Database using
adcrdb.zip file<br />
Autoconfig is Run<br />
Controlfile is created using
adcrdbclone.sql<o:p></o:p></span></span></div>
<div style="background-color: white; color: #333333; line-height: 22px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><b> <u>3. Generates database creation driver file</u></b></span></div>
<div style="background-color: white; color: #333333; line-height: 22px;">
<span style="font-family: Arial, Helvetica, sans-serif;">$ORACLE_HOME/appsutil/clone/context/data/driver/data.drv</span></div>
<div style="background-color: white; color: #333333; line-height: 22px;">
<span style="font-family: Arial, Helvetica, sans-serif;"> </span><u style="font-family: Arial, Helvetica, sans-serif;"><b>4. Copy JDBC Libraries</b></u></div>
<div style="background-color: white; color: #333333; line-height: 22px;">
<span style="font-family: Arial, Helvetica, sans-serif;">$ORACLE_HOME/appsutil/clone /clone/jlib/classes111.zip</span></div>
<div style="background-color: white; color: #333333; line-height: 22px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="background-color: white; color: #333333; line-height: 22px;">
<span style="font-family: Arial, Helvetica, sans-serif;">Ok, Now you can sleep and dream about the cloning.</span></div>
<div style="background-color: white; color: #333333; line-height: 22px;">
<span style="font-family: Arial, Helvetica, sans-serif;">----------- That's it ------</span></div>
</div>
Prashant Namdeohttp://www.blogger.com/profile/01363618383966360072noreply@blogger.com0Pune, Maharashtra, India18.5204303 73.85674369999992518.2795358 73.534020199999929 18.7613248 74.17946719999992tag:blogger.com,1999:blog-5014466644420517902.post-16745880443798952412011-12-23T01:04:00.000+05:302014-12-14T03:39:01.663+05:30Basics of VI Editor of Linux<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">_________________________________________________________________________________</span><br />
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"><br /></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<h4 style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-size: 10pt; font-weight: normal; line-height: 14px;"> </span><span style="font-size: 10pt; line-height: 14px;"><u>Opening a file</u> </span></span></h4>
</div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"><br /></span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-size: 10pt; line-height: 14px;">vi filename:</span><span style="font-size: 10pt; line-height: 14px;"> Creating text</span></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">Edit modes: These keys enter editing modes and type in the text<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">of your document.<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">i Insert before current cursor position<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">I Insert at beginning of current line<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">a Insert (append) after current cursor position<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">A Append to end of line<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">r Replace 1 character<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">R Replace mode<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"><ESC> Terminate insertion or overwrite mode<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"><o:p>_________________________________________________________________________________</o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-size: 10pt; line-height: 14px;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span>
<h4 style="text-align: left;">
<span style="font-size: 10pt; line-height: 14px;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-weight: normal;"> </span> <u>Deletion of text</u></span></span></h4>
</div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">x Delete single character<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">dd Delete current line and put in buffer<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">ndd Delete n lines (n is a number) and put them in buffer<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">J Attaches the next line to the end of the current line (deletes carriage </span><span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">return).</span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">u Undo last command<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"><o:p>_________________________________________________________________________________</o:p></span><br />
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"><o:p><br /></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<h4 style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: normal; line-height: 14px;"> </span><span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"> <u>CUT AND PASTE</u></span></h4>
</div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">yy Yank current line into buffer<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">nyy Yank n lines into buffer<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">p Put the contents of the buffer after the current line<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">P Put the contents of the buffer before the current line<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">_________________________________________________________________________________</span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<h4 style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"><span style="font-weight: normal;"> </span><u>CURSOR POSITIONING</u></span></h4>
</div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">^d Page down<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">^u Page up<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">:n Position cursor at line n<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">:$ Position cursor at end of file<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">^g Display current line number<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">h,j,k,l Left,Down,Up, and Right respectively. </span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"> Your arrow keys should also work if</span><span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"> your keyboard mappings are anywhere near same.</span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">_________________________________________________________________________________</span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<h4 style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"><span style="font-weight: normal;"> </span><u>STRING SUBSTITUTION</u></span></h4>
</div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"><b>:%s#string1#string2#[g]</b> Substitute string2 for string1 on lines</span><span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"> n1 to n2. If g is included (meaning global), </span><br />
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"> all instances of string1 on each line</span><span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"> are substituted. If g is not included,</span><span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">only</span><br />
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"> the first instance per matching line is</span><span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"> substituted.</span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"> </span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"> ^ - <u>matches start of line</u><o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"> . - <u>matches any single character</u><o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"> $ - <u>matches end of line</u><o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">These and other "special characters" (like the forward slash) can be "escaped" with \<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">i.e to match the string "/usr/STRIM100/SOFT" say "\/usr\/STRIM100\/SOFT"<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">Examples:<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">:1,$:s/dog/cat/g Substitute 'cat' for 'dog', every instance<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-size: 10pt; line-height: 14px;"> for the entire file -lines 1 to $ (end of </span><span style="font-size: 10pt; line-height: 14px;">file)</span></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">:23,25:/frog/bird/ Substitute 'bird' for 'frog' on lines<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"> 23 through 25. Only the first instance<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"> on each line is substituted.<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">_________________________________________________________________________________</span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<h4 style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: normal; line-height: 14px;"> </span><span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;"> <u>SAVING, QUITTING and other "ex" Commands</u></span></h4>
</div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-size: 10pt; line-height: 14px;">These commands are all prefixed by pressing colon (:) and then entered in the lower </span><span style="font-size: 10pt; line-height: 14px;">left corner of the window. They are called "ex" commands because they are commands </span><span style="font-size: 10pt; line-height: 14px;">of the ex text editor - the precursor line editor to the screen editor</span></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-size: 10pt; line-height: 14px;">vi. </span><span style="font-size: 10pt; line-height: 14px;">You cannot enter an "ex" command when you are in an edit mode (typing text onto the screen)</span></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">Press <ESC> to exit from an editing mode.<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">:w Write the current file.<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">:w new.file Write the file to the name 'new.file'.<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">:w! Existing.file Overwrite an existing file with the file currently </span><span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">being edited.</span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">:wq Write the file and quit.<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">:q Quit.<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">:q! Quit with no changes.<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">:e filename Open the file 'filename' for editing.</span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">:set number Turns on line numbering<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14px;">:set nonumber Turns off line numbering<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 14px;">_________________________________________________________________________________</span></div>
</div>
</div>
Prashant Namdeohttp://www.blogger.com/profile/01363618383966360072noreply@blogger.com0tag:blogger.com,1999:blog-5014466644420517902.post-77137696117937189812011-12-17T12:07:00.000+05:302014-12-14T03:50:38.022+05:30Something about the Terminal...!!!!<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Arial, Helvetica, sans-serif;">In this section, I will explain about the terminal. We can categorize the term TERMINAL into two</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">1. Hardware Level</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">2. Software Level</span><br />
<b><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></b>
<b><span style="font-family: Arial, Helvetica, sans-serif;">First we will talk about terminals at Hardware Level.</span></b><br />
<span style="line-height: 14px;"><span style="font-family: Arial, Helvetica, sans-serif;">_________________________________________________________________________________</span></span><br />
<b><span style="font-family: Arial, Helvetica, sans-serif;">Q: What is Terminal ?</span></b><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><b>A: </b>Terminal is a machine in a network. It can also be called as a node or system or Computer.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<b><span style="font-family: Arial, Helvetica, sans-serif;">Q: What are the types of Terminals ?</span></b><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><b>A: </b>There are basically 3 types of terminals</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span>1: Thin Clients</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span>2: Dumb Terminals</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span>3: Thick Clients</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<b><span style="font-family: Arial, Helvetica, sans-serif;">Q: What is Thin Client ?</span></b><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><b>A: </b>Thin Clients are the terminals which are not having their own storage.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="font-weight: bold; white-space: pre;"> </span>They depend upon the shared storage in a network. They are Provided with</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>GUI-</b>Graphical User Interface</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<b><span style="font-family: Arial, Helvetica, sans-serif;">Q: What are DUMB Terminals ?</span></b><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><b>A: </b>Dumb Terminals are the nodes which are not having their memory.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="font-weight: bold; white-space: pre;"> </span>They are just having a distributed OS and only a keyboard and a monitor.<b> </b> </span><br />
<span style="line-height: 14px;"><span style="font-family: Arial, Helvetica, sans-serif;">______________________________________________________________________</span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">___________</span><br />
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">_________________________________________________________________________________</span><br />
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;"><br /></span>
<b><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></b>
<span style="font-family: Arial, Helvetica, sans-serif;"><b>Now </b><b>we will talk about terminals at Software Level.</b></span><br />
<span style="line-height: 14px;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><b>Q: So what is a terminal ?</b></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><b>A: </b> Terminal is a software, which provide Command Line Interface (CLI) to a user to operate the system.</span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><b>Q: Still I didn't get it... Please explain it.</b></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><b>A: </b>Ok. You might be familiar with the Command Prompt or CMD in WINDOWS systems. Same way there is a inbuilt software called as Terminal in Linux Systems.</span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">_________________________________________________________________________________</span><br />
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">_________________________________________________________________________________</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 14px;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-size: 13px; line-height: 14px;"><br /></span></span></div>
Prashant Namdeohttp://www.blogger.com/profile/01363618383966360072noreply@blogger.com0tag:blogger.com,1999:blog-5014466644420517902.post-4037752181114404302011-12-16T23:24:00.000+05:302014-12-14T04:01:16.920+05:30Staring Guide to Unix- Some basic Commands<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="fb-subscribe" data-href="https://www.facebook.com/er.prashant10" data-layout="button_count" data-show-faces="true" data-width="450">
</div>
<div dir="ltr" style="text-align: left;" trbidi="on">
<div id="fb-root">
</div>
<span style="font-family: Arial, Helvetica, sans-serif;"><b>We will cover the following sections in this article:</b></span><br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br />
<ol style="text-align: left;">
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Directories</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Moving around the file system</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Listing directory contents</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Changing file permissions and attributes</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Moving, renaming, and copying files</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Viewing and editing files</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Shells</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Environment variables</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Interactive History</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Filename Completion</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Bash is the way cool shell</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Redirection</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Pipes</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Command Substitution</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Searching for strings in files: The grep command</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Searching for files : The find command</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Reading and writing tapes, backups, and archives: The tar command </span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">File compression: compress, gzip, and bzip2</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Looking for help: The man and apropos commands</span></li>
</ol>
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.3999996185303px;">________________________________________________________________________</span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><br /></span></span>
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><u> <b>Basic UNIX Command Line (shell) navigation </b></u><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.3999996185303px;">________________________________________________________________________</span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="color: #3355cc;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;"><br /></span></span>
<span class="Apple-style-span" style="color: #3355cc;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;"><b><u>Directories: </u></b></span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">File and directory paths in UNIX use the forward slash "/" <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">to separate directory names in a path.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">examples:<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">/ "root" directory<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">/usr directory usr (sub-directory of / "root" directory)<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">/usr/STRIM100 STRIM100 is a subdirectory of /usr<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<div class="MsoNormal">
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; line-height: 115%;"><span class="Apple-style-span" style="color: black; font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**********************</span></span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">****************************************************</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><b><u><span class="Apple-style-span" style="color: black; font-size: small; line-height: normal;"><span style="line-height: 14px;"> </span></span>Moving around the file system:</u></b></span></span></div>
</div>
</div>
</div>
<div class="MsoNormal">
<div class="MsoNormal">
<div class="MsoNormal">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="mso-bidi-font-weight: normal;"><span style="line-height: 115%;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">***************************************</span></span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">***********************************</span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">pwd Show the "present working directory", or current directory.</span></span></div>
</div>
</div>
</div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">cd Change current directory to your HOME directory.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">cd /usr/STRIM100 Change current directory to /usr/STRIM100.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">cd INIT Change current directory to INIT which is a sub-directory of the</span></span><br />
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><span class="Apple-tab-span" style="white-space: pre;"> </span> current directory.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">cd .. Change current directory to the parent directory of the current directory.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">cd $STRMWORK Change current directory to the directory defined by the <o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: 1.0in; text-indent: .5in;">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Environment variable 'STRMWORK'.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">cd ~bob Change the current directory to the user bob's home directory (if you have permission).<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; line-height: 115%;"><span class="Apple-style-span" style="color: black; font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">********************************************************</span></span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">******************</span><br />
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><b><span class="Apple-style-span" style="color: black; font-size: small; line-height: normal;"><span style="line-height: 14px;"> </span></span>Listing directory contents:</b></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*</span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">ls list a directory<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">ls -l list a directory in long ( detailed ) format<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> for example:<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">$ ls -l <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">drwxr-xr-x 4 cliff user 1024 Jun 18 09:40 WAITRON_EARNINGS<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">-rw-r--r-- 1 cliff user 767392 Jun 6 14:28 scanlib.tar.gz<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">| | | | | | | | | | | <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">| | | | | owner group size date time name <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">| | | | number of links to file or directory contents<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">| | | permissions for world<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">| | permissions for members of group<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">| permissions for owner of file: r = read, w = write, x = execute -=no permission<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">type of file: - = normal file, d=directory, l = symbolic link, and others...<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">ls -a List the current directory including hidden files. Hidden files <o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: .5in; text-indent: .5in;">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">starts with "." <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">ls -ld * List all the file and directory names in the current directory <o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: 77.25pt;">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">using long format. Without the "d" option, ls would list the contents of any sub-directory of the current. With the "d" option, ls just lists them like regular files. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><b><u>Changing file permissions and attributes</u></b><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">chmod 755 file Changes the permissions of file to be rwx for the <o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: 125.25pt;">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">owner,and rx for the group and the world. (7 = rwx = 111 binary. 5 = r-x = 101 binary) chgrp user file </span></span></div>
<div class="MsoNormal" style="margin-left: 125.25pt;">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> Makes file belong to the group user.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">chown cliff file Makes cliff the owner of file.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="mso-bidi-font-weight: normal;"><span style="line-height: 115%;">chown -R cliff dir </span></span><span style="mso-bidi-font-weight: normal;"><span style="line-height: 115%;">Makes cliff the owner of dir and everything in its directory</span></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> tree.</span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">You must be the owner of the file/directory or be root before you can do any of</span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> these things. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; line-height: 115%;"><span class="Apple-style-span" style="color: black; font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><br />
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><b><u><span class="Apple-style-span" style="color: black; font-size: small; line-height: normal;"><span style="line-height: 14px;"> </span></span>Moving, renaming, and copying files:</u></b></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">cp file1 file2 copy a file<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">mv file1 newname move or rename a file<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">mv file1 ~/AAA/ move file1 into sub-directory AAA in your home directory.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">rm file1 [file2 ...] remove or delete a file<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">rm -r dir1 [dir2...] recursivly remove a directory and its contents BE CAREFUL!<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">mkdir dir1 [dir2...] create directories<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">mkdir -p dirpath create the directory dirpath, including all implied</span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><span class="Apple-tab-span" style="white-space: pre;"> </span>directories in the path.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">rmdir dir1 [dir2...] remove an empty directory<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><b><u>Viewing and editing files:</u></b><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">cat filename Dump a file to the screen in ascii. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">more filename Progressively dump a file to the screen: ENTER = one line down <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> SPACEBAR = page down q=quit<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">less filename Like more, but you can use Page-Up too. Not on all systems. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">vi filename Edit a file using the vi editor. All UNIX systems will have vi</span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><span class="Apple-tab-span" style="white-space: pre;"> </span> in some form. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">emacs filename Edit a file using the emacs editor. Not all systems will have</span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><span class="Apple-tab-span" style="white-space: pre;"> </span> emacs. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">head filename Show the first few lines of a file.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">head -n filename Show the first n lines of a file.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">tail filename Show the last few lines of a file.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">tail -n filename Show the last n lines of a file.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><b><u><span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; line-height: 115%;"><o:p><span class="Apple-style-span" style="color: black; font-size: small; line-height: normal;"><span style="line-height: 14px;"> </span></span></o:p></span></span><span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; line-height: 115%;">Shells</span></span></u></b></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">The behavior of the command line interface will differ slightly depending <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">on the shell program that is being used. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Depending on the shell used, some extra behaviors can be quite nifty.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">You can find out what shell you are using by the command:<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> echo $SHELL<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Of course you can create a file with a list of shell commands and execute it like<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">a program to perform a task. This is called a shell script. This is in fact the <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">primary purpose of most shells, not the interactive command line behavior. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><b><u>Environment variables</u></b><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">You can teach your shell to remember things for later using environment variables.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">For example under the bash shell:<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">export CASROOT=/usr/local/CAS3.0 Defines the variable CASROOT with</span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="mso-bidi-font-weight: normal;"><span style="line-height: 115%;"><span class="Apple-tab-span" style="white-space: pre;"> </span>the value </span></span><span style="mso-bidi-font-weight: normal;"><span style="line-height: 115%;">/usr/local/CAS3.0.</span></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">export LD_LIBRARY_PATH=$CASROOT/Linux/lib Defines the variable <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> LD_LIBRARY_PATH with <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> the value of CASROOT with /Linux/lib</span></span><br />
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><span class="Apple-tab-span" style="white-space: pre;"> </span> appended, </span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="mso-bidi-font-weight: normal;"><span style="line-height: 115%;"> </span></span><span style="mso-bidi-font-weight: normal;"><span style="line-height: 115%;"> or /usr/local/CAS3.0/Linux/lib</span></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">By prefixing $ to the variable name, you can evaluate it in any command:<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">cd $CASROOT Changes your present working directory to the value of CASROOT<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">echo $CASROOT Prints out the value of CASROOT, or /usr/local/CAS3.0<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">printenv CASROOT Does the same thing in bash and some other shells. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><b><u>Interactive History</u></b><o:p></o:p></span></span></div>
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><br />
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">A feature of bash and tcsh (and sometimes others) you can use <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">the up-arrow keys to access your previous commands, edit <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">them, and re-execute them.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><b><u>Filename Completion</u></b><o:p></o:p></span></span></div>
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><br />
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">A feature of bash and tcsh (and possibly others) you can use the<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">TAB key to complete a partially typed filename. For example if you<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">have a file called constantine-monks-and-willy-wonka.txt in your <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">directory and want to edit it you can type 'vi const', hit the TAB key, <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">and the shell will fill in the rest of the name for you (provided the <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">completion is unique).<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><b><u>Bash is the way cool shell. </u></b><o:p></o:p></span></span></div>
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><br />
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Bash will even complete the name of commands and environment variables.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">And if there are multiple completions, if you hit TAB twice bash will show<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">you all the completions. Bash is the default user shell for most Linux systems. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><b><u>Redirection:</u></b><o:p></o:p></span></span></div>
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><br />
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">grep string filename > newfile Redirects the output of the above grep<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> command to a file 'newfile'.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">grep string filename >> existfile Appends the output of the grep command <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> to the end of 'existfile'.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">The redirection directives, > and >> can be used on the output of most commands <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">to direct their output to a file.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><br />
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><b><u>Pipes:</u></b><o:p></o:p></span></span></div>
<span class="Apple-style-span" style="line-height: 14px;"><span class="Apple-style-span" style="font-size: small; line-height: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><br />
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">The pipe symbol "|" is used to direct the output of one command to the input <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">of another.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">For example:<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">ls -l | more This commands takes the output of the long format directory list command <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> "ls -l" and pipes it through the more command (also known as a filter).<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> In this case a very long list of files can be viewed a page at a time.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">du -sc * | sort -n | tail <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> The command "du -sc" lists the sizes of all files and directories in the current working directory. That is piped through "sort -n" which orders the output from smallest to largest size. Finally, that output is piped through "tail" which displays only the last few (which just happen to be the largest) results.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><span class="Apple-style-span" style="color: black; font-size: small; line-height: normal;"><span style="line-height: 14px;">**************************************************************************</span></span></span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><br />
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><b><u>Command Substitution</u></b><o:p></o:p></span></span></div>
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><br />
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">You can use the output of one command as an input to another command in another way <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">called command substitution. Command substitution is invoked when by enclosing the <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">substituted command in backwards single quotes. For example:<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">cat `find . -name aaa.txt`<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">which will cat ( dump to the screen ) all the files named aaa.txt that exist in the current directory or in any subdirectory tree. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">***************************************************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">***********************</span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><b><u>Searching for strings in files: The grep command</u></b><o:p></o:p></span></span></div>
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">********************************************************************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">******</span><br />
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">grep <string> <filename> prints all the lines in a file that contain the string</span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;">or</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">cat <filename> |grep <string></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*********************************************************</span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><b><u>Searching for files : The find command</u></b><o:p></o:p></span></span></div>
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**********************************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">****************************************</span><br />
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">find search_path -name filename</span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">find . -name aaa.txt Finds all the files named aaa.txt in the current directory or any subdirectory tree. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">find / -name vimrc Find all the files named 'vimrc' anywhere on the system. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">find /usr/local/games -name "*xpilot*" <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> Find all files whose names contain the string 'xpilot' which exist within the '/usr/local/games' directory tree. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*******************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*******************************************************</span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><b><u>Reading and writing tapes, backups, and archives: The tar command </u></b><o:p></o:p></span></span></div>
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">********************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">******************************************************</span><br />
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">The tar command stands for "tape archive". It is the "standard" way to read <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">and write archives (collections of files and whole directory trees).<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Often you will find archives of stuff with names like stuff.tar, or stuff.tar.gz. This is stuff in a tar archive, and stuff in a tar archive which has been compressed using the gzip compression program respectivly. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Chances are that if someone gives you a tape written on a UNIX system, it will be in tar format, and you will use tar (and your tape drive) to read it. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Likewise, if you want to write a tape to give to someone else, you should probably use <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">tar as well. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Tar examples:<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">tar xv Extracts (x) files from the default tape drive while listing (v = verbose) the file names to the screen.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">tar tv Lists the files from the default tape device without extracting them. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">tar cv file1 file2 <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> Write files 'file1' and 'file2' to the default tape device.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">tar cvf archive.tar file1 [file2...] <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> Create a tar archive as a file "archive.tar" containing file1, <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> file2...etc.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">tar xvf archive.tar extract from the archive file<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">tar cvfz archive.tar.gz dname <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="mso-bidi-font-weight: normal;"><span style="line-height: 115%;"><span class="Apple-tab-span" style="white-space: pre;"> </span> Create a gzip compressed tar archive containing everything in <span class="Apple-tab-span" style="white-space: pre;"> </span> the </span></span><span style="mso-bidi-font-weight: normal;"><span style="line-height: 115%;">directory 'dname'. This does not work with all versions of tar.</span></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">tar xvfz archive.tar.gz <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><span class="Apple-tab-span" style="white-space: pre;"> </span> Extract a gzip compressed tar archive. Does not work with all</span></span><br />
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> versions of tar. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">tar cvfI archive.tar.bz2 dname <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> Create a bz2 compressed tar archive. Does not work with all versions</span></span><br />
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><span class="Apple-tab-span" style="white-space: pre;"> </span> of tar<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="color: #3355cc; font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><b><u>File compression: compress, gzip, and bzip2</u></b><o:p></o:p></span></span></div>
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*********************************************************</span><br />
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">The standard UNIX compression commands are compress and uncompress. Compressed files have <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">a suffix .Z added to their name. For example:<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">compress part.igs Creates a compressed file part.igs.Z<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">uncompress part.igs Uncompresseis part.igs from the compressed file part.igs.Z.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> Note the .Z is not required.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Another common compression utility is gzip (and gunzip). These are the GNU compress and uncompress utilities. gzip usually gives better compression than standard compress, but may not be installed on all systems. The suffix for gzipped files is .gz<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">gzip part.igs Creates a compressed file part.igs.gz<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">gunzip part.igs Extracts the original file from part.igs.gz<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">The bzip2 utility has (in general) even better compression than gzip, but at the cost of longer times to compress and uncompress the files. It is not as common a utility as gzip, but is becoming more generally available. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">bzip2 part.igs Create a compressed Iges file part.igs.bz2<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">bunzip2 part.igs.bz2 Uncompress the compressed iges file. <o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">**************************************************************************</span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #3355cc; line-height: 115%;"><b>Looking for help: The man and apropos</b></span><span style="mso-bidi-font-weight: normal;"><span style="line-height: 115%;"><b> <span style="color: blue;">commands</span></b><o:p></o:p></span></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*****************</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 14px;">*********************************************************</span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="mso-bidi-font-weight: normal;"><span style="line-height: 115%;">Most of the commands have a manual page which give sometimes useful, often more or less </span></span><span style="mso-bidi-font-weight: normal;"><span style="line-height: 115%;">detailed, sometimes cryptic and unfathomable discriptions of their usage. Some say they </span></span><span style="mso-bidi-font-weight: normal;"><span style="line-height: 115%;">are called man pages because they are only for real men.</span></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Example:<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">man ls Shows the manual page for the ls command<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">You can search through the man pages using apropos<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Example:<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">apropos build Shows a list of all the man pages whose discriptions contain the word "build"<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="mso-bidi-font-weight: normal;"><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Do a man apropos for detailed help on apropos.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;">______________________________________________________________________</span></div>
<span style="font-family: Arial, Helvetica, sans-serif;">--Regards</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"> V3nom</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">______________________________________________________________________</span><br />
<br /></div>
</div>
Prashant Namdeohttp://www.blogger.com/profile/01363618383966360072noreply@blogger.com1