tag:blogger.com,1999:blog-21388556736527778812024-03-13T17:52:52.923+05:30MeansOFminEMy Stuffs and InformationsUnknownnoreply@blogger.comBlogger1125tag:blogger.com,1999:blog-2138855673652777881.post-82221437987421063722011-04-28T21:23:00.000+05:302011-04-28T21:23:54.443+05:30BASIC COMMANDS IN UNIX<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"><span style="font-size: 14pt;">COMMANDS: </span></b></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">1. TASK : </b>To
display the system date and time.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND : </b>date.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX : </b>date.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION: </b>This command displays the
current system date and time on the
</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
screen.</div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"> OUTPUT : </b>Tue Jun 19<b style="mso-bidi-font-weight: normal;"> </b>11:37:17
GMT 2007.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> 2. TASK :</b> To display the current
month.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> </b><b style="mso-bidi-font-weight: normal;"><span lang="FR">COMMAND : </span></b><span lang="FR">date.</span></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="FR"> SYNTAX :</span></b><span lang="FR"> date +%m.</span></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="FR"> </span>EXPLANATION: </b>This command displays the current month
on the screen.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT : </b>06.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> 3. TASK : </b>To display the name of
the current month.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> </b><b style="mso-bidi-font-weight: normal;"><span lang="FR">COMMAND : </span></b><span lang="FR">date.</span></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="FR"> SYNTAX : </span></b><span lang="FR">date +%h.</span></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="FR"> </span>EXPLANATION: </b>This command displays
the name of the current month on the </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">
</b>screen. </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT : </b> Jun.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">4. TASK : </b>To
display the current system date.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> </b><b style="mso-bidi-font-weight: normal;"><span lang="FR">COMMAND :</span></b><span lang="FR"> date.</span></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="FR"> SYNTAX :</span></b><span lang="FR"> date +%d.</span></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="FR"> </span>EXPLANATION: </b>This command
displays the current system date on the screen.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b> 19.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">5. TASK : </b>To
display the current system date (year).</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> </b><b style="mso-bidi-font-weight: normal;"><span lang="FR">COMMAND :</span></b><span lang="FR"> date.</span></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="FR"> SYNTAX :</span></b><span lang="FR"> date +%y.</span></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="FR"> </span>EXPLANATION: </b>This command
displays the current year on the screen.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b> 07.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">6. TASK :</b>
To display the current system time.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> </b><b style="mso-bidi-font-weight: normal;"><span lang="FR">COMMAND :</span></b><span lang="FR"> date.</span></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="FR"> SYNTAX :</span></b><span lang="FR"> date +%H.</span></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="FR"> </span>EXPLANATION:</b> This command
displays the current system time (in hours) on the</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
screen.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT : </b>11.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">7. TASK :</b>
To display the current system time.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> </b><b style="mso-bidi-font-weight: normal;"><span lang="FR">COMMAND :</span></b><span lang="FR"> date.</span></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="FR"> SYNTAX
:</span></b><span lang="FR"> date +%M.</span></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="FR"> </span>EXPLANATION:</b> This command
displays the current system time (in minutes) on the </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
screen.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b> 43.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">8. TASK :</b> To
display the current system time.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> date.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX :</b> date +%S.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION:</b> This command
displays the current system time (in seconds) on the </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
screen.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT : </b>15.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">9. TASK : </b> To display the calendar of the current month.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> calendar.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX :</b> cal.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION:</b> This command
displays the calendar of the current month on the </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
screen.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT : </b>Jun
07</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> </b>S M T W T F S</div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"> </b>1 2</div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"> </b>3 4 5 6 7 8 9</div>
<div class="MsoNormal">
10 11 12 13 14 15 16</div>
<div class="MsoNormal">
17 18 19 20 21 22 23</div>
<div class="MsoNormal">
24 25 26 27 28 29 30</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">10. TASK :</b>
To display user-defined message.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> echo.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX :</b> echo “message”.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION: </b>This
command displays on the screen the argument of the echo</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
command.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b> echo “OS”.</div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;"> </b><b style="mso-bidi-font-weight: normal;"><span style="font-family: Wingdings;">è</span>
OS</b></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">11. TASK :</b>
To display the details of all users.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> who.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX :</b>
who.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION :</b> This
command lists the information about all the users who have </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">
</b>logged on to that system.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">12. TASK :</b>
To display the user detail.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> who.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX :</b> whoami.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION :</b> This
command displays information about the current user of the </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">
</b>system on the screen.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT : </b>root.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">13. TASK : </b>To
create a directory.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> make directory.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX :</b> mkdir.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION :</b> This
command is used to create a new directory with the specified </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> </b>name.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXAMPLE : </b>mkdir student.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT : </b>The directory “<b style="mso-bidi-font-weight: normal;">student</b>” is created.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">14. TASK : </b>To
change directory.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> change directory.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX :</b> <b style="mso-bidi-font-weight: normal;">cd</b> directory name.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION :</b> This
command is used to switch from one directory to another.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXAMPLE :</b> cd staff.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b> The directory “<b style="mso-bidi-font-weight: normal;">staff</b>” is switched onto.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">15. TASK :</b>
To delete a directory.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> remove directory.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX :</b> <b style="mso-bidi-font-weight: normal;">rmdir</b> directory name </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION :</b> This command is used to delete the specified
directory.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXAMPLE :</b> rmdir student.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b> The “<b style="mso-bidi-font-weight: normal;">student</b>” directory is deleted.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">16. TASK :</b>
To come out of a sub-directory.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> change directory.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX : cd ..</b></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION : </b>This
command helps in switching to the main directory.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">17. TASK : </b>To
list all the files and directories.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> list.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX :</b> <b style="mso-bidi-font-weight: normal;">ls</b>.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION :</b> This
command displays all the files and directories of the system.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">18. TASK : </b> To create a file.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> cat.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX :</b> <b style="mso-bidi-font-weight: normal;">cat> </b>file name.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION :</b> This
command leads to the creation of a new file with the specified</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
file name
and contents.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXAMPLE :</b> cat> wind.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b> A null file called “<b style="mso-bidi-font-weight: normal;">wind</b>”<b style="mso-bidi-font-weight: normal;"> </b>is created.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">19. TASK :</b>
To view a file.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> cat.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX :</b> <b style="mso-bidi-font-weight: normal;">cat </b>file name.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION : </b>This command displays the contents of
the specified file.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXAMPLE :</b> cat wind.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b> Contents of the file
called “<b style="mso-bidi-font-weight: normal;">wind</b>” will be displayed on
the screen.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">20. TASK :</b>
To copy a file.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> </b><b style="mso-bidi-font-weight: normal;"><span lang="FR">COMMAND :</span></b><span lang="FR"> copy.</span></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="FR"> SYNTAX :</span></b><span lang="FR"> <b style="mso-bidi-font-weight: normal;">cp </b>sourcefile
destinationfile.</span></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"><span lang="FR"> </span>EXPLANATION :</b> This command produces a copy of the
source file and is stored in </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">
</b>the specified destination
file by overwriting its previous </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
contents.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXAMPLE :</b> cp sun moon.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b> The contents of “<b style="mso-bidi-font-weight: normal;">sun</b>” file will be copied to the “<b style="mso-bidi-font-weight: normal;">moon</b>” file.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">21. TASK :</b>
To move a file.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> move.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX :</b> <b style="mso-bidi-font-weight: normal;">mv </b>sourcefile destinationfile.<b style="mso-bidi-font-weight: normal;">
</b></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION : </b>After moving the contents of the source
file into destination file,</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
the
source file is deleted.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXAMPLE :</b> mv sun moon.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b> After copying contents
from the “<b style="mso-bidi-font-weight: normal;">sun</b>” file to “<b style="mso-bidi-font-weight: normal;">moon</b>” file, the </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> </b>“<b style="mso-bidi-font-weight: normal;">sun</b>” file is deleted. </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">22. TASK :</b> To display / cut a column
from a file.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> cut.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX :</b> <b style="mso-bidi-font-weight: normal;">cut –c </b>no. file name. </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION :</b> This
command displays the characters of a particular column in the</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
specified file.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXAMPLE :</b> <b style="mso-bidi-font-weight: normal;">cut –c</b>3 moon.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b> Those characters occurring
in the 3<sup>rd </sup>column of the file called </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> </b>“<b style="mso-bidi-font-weight: normal;">moon</b>” are displayed.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">23. TASK :</b>
To delete a file.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> remove.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX :</b> <b style="mso-bidi-font-weight: normal;">rm </b>file name.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION :</b> This command deletes the specified file
from the directory.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXAMPLE : </b>rm sun.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b> The file called “<b style="mso-bidi-font-weight: normal;">sun</b>” will be deleted.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">24. TASK :</b>
To retrieve a part of a file.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> head.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX :</b> <b style="mso-bidi-font-weight: normal;">head -</b>no. of rows file
name.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION : </b>This command displays the specified no.
of rows form the top </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
of the specified file.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXAMPLE : </b>head -1 sun.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b> The first row of the file
called “<b style="mso-bidi-font-weight: normal;">sun</b>” is displayed.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">25. TASK :</b>
To retrieve a file.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> tail.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX : tail -</b>no. of rows file
name.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION :</b> This command displays the specified
no. of rows form the bottom </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
of
the specified file.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXAMPLE : </b>tail -1 moon.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b> The last row of the file
called “<b style="mso-bidi-font-weight: normal;">moon</b>” is displayed.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">26. TASK :</b>
To sort the contents of a file.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> sort.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX : </b> <b style="mso-bidi-font-weight: normal;">sort </b>file name.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION :</b> This command helps in sorting the
contents of a file in ascending </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
order.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXAMPLE : </b>sort win.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b> The contents of the file “<b style="mso-bidi-font-weight: normal;">win</b>” are displayed on the screen in a </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> </b>sorted
order.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">27. TASK :</b>
To display the no. of characters in a file.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> word count.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX :</b> <b style="mso-bidi-font-weight: normal;">wc </b>file name.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION :</b> This command displays on the screen the
no. of rows, words, and </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">
</b>the sum of no<b style="mso-bidi-font-weight: normal;">.</b> of characters and words.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXAMPLE :</b> wc ball.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT : </b>The no. of rows, words,
and no. of characters present in the file </div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> </b>“<b style="mso-bidi-font-weight: normal;">ball</b>”
are displayed.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;">28. TASK :</b>
To display the calendar of a year.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> COMMAND :</b> cal.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> SYNTAX :</b> <b style="mso-bidi-font-weight: normal;">cal </b>year.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXPLANATION :</b> This command displays on the screen the
calendar of the specified year.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> EXAMPLE : </b> cal 2007.</div>
<div class="MsoNormal" style="margin-left: -9.0pt;">
<b style="mso-bidi-font-weight: normal;"> OUTPUT :</b> The calendar of the year <b style="mso-bidi-font-weight: normal;">2007 </b>will be displayed.</div>
</div>Unknownnoreply@blogger.com0