<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Linux-New%2FC2%2FWorking-with-Regular-Files%2FEnglish</id>
		<title>Linux-New/C2/Working-with-Regular-Files/English - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Linux-New%2FC2%2FWorking-with-Regular-Files%2FEnglish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Linux-New/C2/Working-with-Regular-Files/English&amp;action=history"/>
		<updated>2026-04-03T21:48:10Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Linux-New/C2/Working-with-Regular-Files/English&amp;diff=57615&amp;oldid=prev</id>
		<title>Madhurig: Madhurig moved page Linux-Ubuntu/C2/Working-with-Regular-Files/English to Linux-New/C2/Working-with-Regular-Files/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Linux-New/C2/Working-with-Regular-Files/English&amp;diff=57615&amp;oldid=prev"/>
				<updated>2026-03-24T11:07:46Z</updated>
		
		<summary type="html">&lt;p&gt;Madhurig moved page &lt;a href=&quot;/index.php/Linux-Ubuntu/C2/Working-with-Regular-Files/English&quot; class=&quot;mw-redirect&quot; title=&quot;Linux-Ubuntu/C2/Working-with-Regular-Files/English&quot;&gt;Linux-Ubuntu/C2/Working-with-Regular-Files/English&lt;/a&gt; to &lt;a href=&quot;/index.php/Linux-New/C2/Working-with-Regular-Files/English&quot; title=&quot;Linux-New/C2/Working-with-Regular-Files/English&quot;&gt;Linux-New/C2/Working-with-Regular-Files/English&lt;/a&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 11:07, 24 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Madhurig</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Linux-New/C2/Working-with-Regular-Files/English&amp;diff=57561&amp;oldid=prev</id>
		<title>Madhurig at 10:05, 11 March 2026</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Linux-New/C2/Working-with-Regular-Files/English&amp;diff=57561&amp;oldid=prev"/>
				<updated>2026-03-11T10:05:30Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 10:05, 11 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 150:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 150:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| To keep the same file name, we need not specify its name at the destination.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| To keep the same file name, we need not specify its name at the destination.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Let’s type ''' c p space slash home slash spoken slash test d i r slash test1 space slash home slash spoken ''' and press '''Enter'''.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Let’s type ''' c p space slash home slash spoken slash test d i r slash test1 space slash home slash spoken ''' &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;and press '''Enter'''.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This will copy the file '''test1''' from '''slash home slash spoken slash test dir slash''' to the home directory.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This will copy the file '''test1''' from '''slash home slash spoken slash test dir slash''' to the home directory.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 233:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 235:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''mv command'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''mv command'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The '''mv''' command moves files and directories.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The '''mv''' command moves files and directories.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* It is used to rename files or directory or move them to another directory.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* It is used to rename files or directory or move them to another directory.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 290:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 293:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| The next command is '''r m'''.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| The next command is '''r m'''.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|- &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|- &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| '''Slide&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;''' '''&lt;/del&gt;7'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| '''Slide 7'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''rm command'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''rm command'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The '''rm''' command in Linux is used to remove files and directories.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The '''rm''' command in Linux is used to remove files and directories.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* It permanently deletes the specified files from the system&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* It permanently deletes the specified files from the system&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 320:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 324:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;||Sometimes a file is write-protected, and rm cannot delete it.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;||Sometimes a file is write-protected, and rm cannot delete it.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;Type''' r m space hyphen r f space test dir '''and press''' Enter'''.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Type''' r m space hyphen r f space test dir '''and press''' Enter'''.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This deletes '''test dir''' and all its files and subdirectories recursively.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This deletes '''test dir''' and all its files and subdirectories recursively.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Madhurig</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Linux-New/C2/Working-with-Regular-Files/English&amp;diff=57560&amp;oldid=prev</id>
		<title>Madhurig at 10:03, 11 March 2026</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Linux-New/C2/Working-with-Regular-Files/English&amp;diff=57560&amp;oldid=prev"/>
				<updated>2026-03-11T10:03:11Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://script.spoken-tutorial.org/index.php?title=Linux-New/C2/Working-with-Regular-Files/English&amp;amp;diff=57560&amp;amp;oldid=57383&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Madhurig</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Linux-New/C2/Working-with-Regular-Files/English&amp;diff=57383&amp;oldid=prev</id>
		<title>Madhurig at 12:53, 23 January 2026</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Linux-New/C2/Working-with-Regular-Files/English&amp;diff=57383&amp;oldid=prev"/>
				<updated>2026-01-23T12:53:33Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://script.spoken-tutorial.org/index.php?title=Linux-New/C2/Working-with-Regular-Files/English&amp;amp;diff=57383&amp;amp;oldid=57382&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Madhurig</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Linux-New/C2/Working-with-Regular-Files/English&amp;diff=57382&amp;oldid=prev</id>
		<title>Ketkinaina: Created page with &quot;'''Title of the script: Working with Regular Files in Linux.  '''Authors:''' '''EduPyramids'''  '''Keywords:''' Linux, regular files, cp command, mv command, rm command, cmp c...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Linux-New/C2/Working-with-Regular-Files/English&amp;diff=57382&amp;oldid=prev"/>
				<updated>2026-01-23T07:22:40Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;Title of the script: Working with Regular Files in Linux.  &amp;#039;&amp;#039;&amp;#039;Authors:&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;EduPyramids&amp;#039;&amp;#039;&amp;#039;  &amp;#039;&amp;#039;&amp;#039;Keywords:&amp;#039;&amp;#039;&amp;#039; Linux, regular files, cp command, mv command, rm command, cmp c...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Title of the script: Working with Regular Files in Linux.&lt;br /&gt;
&lt;br /&gt;
'''Authors:''' '''EduPyramids'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords:''' Linux, regular files, cp command, mv command, rm command, cmp command, wc command, EduPyramids, video tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|- &lt;br /&gt;
|| '''Visual Cue'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 1'''&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
&lt;br /&gt;
|| Welcome to this Spoken tutorial on '''Working with Regular Files '''in''' Linux.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 2 '''&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
* Copy, move, and delete regular files in '''Linux'''&lt;br /&gt;
* Use file-handling commands such as '''cp''', '''mv''', and '''rm'''&lt;br /&gt;
* Compare files and count lines, words, and characters using '''cmp''' and '''wc'''&lt;br /&gt;
* Use important command options to manage files safely.&lt;br /&gt;
|| In this tutorial, we will learn how to:&lt;br /&gt;
* Copy, move, and delete regular files in '''Linux'''&lt;br /&gt;
* Use file-handling commands such as '''c p''', '''m v''', and '''r m'''&lt;br /&gt;
* Compare files and count lines, words, and characters using '''c m p''' and '''w c'''&lt;br /&gt;
* Use important command options to manage files safely.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 3'''&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
|| To record this tutorial, I am using&lt;br /&gt;
&lt;br /&gt;
'''Ubuntu OS '''version 24 point 04. &lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 4'''&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
&lt;br /&gt;
[https://edupyramids.org/ https://EduPyramids.org] &lt;br /&gt;
|| To follow this tutorial,&lt;br /&gt;
&lt;br /&gt;
Learners should have '''Ubuntu '''version''' 24 point 04'''.&lt;br /&gt;
&lt;br /&gt;
For the prerequisite of '''Linux''' tutorials please visit this website.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 5'''&lt;br /&gt;
&lt;br /&gt;
'''Code files'''&lt;br /&gt;
&lt;br /&gt;
The following code file is required to practice this tutorial&lt;br /&gt;
# '''wrf-commands.txt'''&lt;br /&gt;
&lt;br /&gt;
This file is provided in the Code Files link of this tutorial page.&lt;br /&gt;
|| The following code file is required to practice this tutorial.&lt;br /&gt;
&lt;br /&gt;
This file is provided in the '''Code Files''' link of this tutorial page.&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| Let’s get started with the '''c p''' command.&lt;br /&gt;
&lt;br /&gt;
Let’s see what a '''c p''' command does?&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 6'''&lt;br /&gt;
&lt;br /&gt;
'''cp command'''&lt;br /&gt;
&lt;br /&gt;
* The '''cp''' command is used to copy files and directories in Linux.&lt;br /&gt;
* It creates a duplicate of a file or directory at a specified location.&lt;br /&gt;
* It does not change or delete the original file&lt;br /&gt;
* '''cp SOURCE DESTINATION'''&lt;br /&gt;
&lt;br /&gt;
copies a file to another location&lt;br /&gt;
* '''cp SOURCE DIRECTORY'''&lt;br /&gt;
&lt;br /&gt;
copies one or more files into a directory&lt;br /&gt;
|| * The '''c p''' command is used to copy files and directories in '''Linux'''.&lt;br /&gt;
* It creates a duplicate of a file or directory at a specified location.&lt;br /&gt;
* It does not change or delete the original file&lt;br /&gt;
* The command '''c p SOURCE DESTINATION''', copies a file to another location and &lt;br /&gt;
* The''' c p SOURCE DIRECTORY, '''copies one or more files into a directory.&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| Let’s see how to copy a file using the '''c p''' command. &lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl+Alt+T '''keys''' together.'''Type: '''mkdir testdir '''press '''Enter'''&lt;br /&gt;
&lt;br /&gt;
Point to''' testdir''' '''directory.'''&lt;br /&gt;
&lt;br /&gt;
Type: '''cd testdir'''Highlight the changed directory&lt;br /&gt;
&lt;br /&gt;
Type: '''pwd '''press '''Enter'''&lt;br /&gt;
&lt;br /&gt;
Highlight the '''/home/spoken/testdir'''&lt;br /&gt;
|| Let us open the terminal. &lt;br /&gt;
&lt;br /&gt;
Let us make a directory named '''test d i r''' in the home folder.&lt;br /&gt;
&lt;br /&gt;
Type '''m k d i r test d i r '''press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
The directory '''test d i r''' is created in the home directory.&lt;br /&gt;
&lt;br /&gt;
Let us change the directory from '''home''' to '''test d i r'''.&lt;br /&gt;
&lt;br /&gt;
Type '''c d space test d i r''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
We can see that the directory has changed to '''test d i r'''.&lt;br /&gt;
&lt;br /&gt;
Now type '''p w d''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
My current working directory is '''slash home slash spoken slash test d i r'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Type '''cat &amp;gt;test1'''&lt;br /&gt;
&lt;br /&gt;
Type:''' I am using Linux. '''and press '''Enter.Press Ctrl + D keys together'''&lt;br /&gt;
&lt;br /&gt;
Type''' cat test1'''&lt;br /&gt;
&lt;br /&gt;
Type''' cp test1 test2 '''and press''' Enter'''.&lt;br /&gt;
&lt;br /&gt;
Point to the files test1 and test2&lt;br /&gt;
|| Let’s create a file by typing''' cat space''' '''greater than test1'''.&lt;br /&gt;
&lt;br /&gt;
After pressing '''Enter''', the command waits for input from the user.&lt;br /&gt;
&lt;br /&gt;
Now I will type, '''I am using Linux. '''and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
Press''' Ctrl''' and''' D '''keys to come out of input mode.&lt;br /&gt;
&lt;br /&gt;
Let’s type '''cat space test1''' to see the content of the file '''test1'''.&lt;br /&gt;
&lt;br /&gt;
Now type '''c p space''' '''test1 space''' '''test2 '''and''' '''press''' Enter'''.&lt;br /&gt;
&lt;br /&gt;
This copies the content of '''test1''' into a new file '''test2''' in the same directory.&lt;br /&gt;
&lt;br /&gt;
If the file '''test2''' does not exist, it will be created.&lt;br /&gt;
&lt;br /&gt;
If it exists, its content is overwritten.&lt;br /&gt;
|- &lt;br /&gt;
|| Type '''cat test2 '''and press''' Enter.'''&lt;br /&gt;
|| To check type '''cat space test2''' and press''' Enter'''.&lt;br /&gt;
&lt;br /&gt;
The original file '''test1 '''remains unchanged.&lt;br /&gt;
&lt;br /&gt;
'''test1''' is the '''source file''' and '''test2''' is the '''destination file'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Type '''cp /home/spoken/testdir/test1 /home/spoken/test2 '''and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
Show in side by side manner&lt;br /&gt;
&lt;br /&gt;
Type''' ls /home/spoken''' and press''' Enter.'''&lt;br /&gt;
|| We can also copy files between directories.&lt;br /&gt;
&lt;br /&gt;
Type''' c p space slash home slash spoken slash test d i r slash test1 space slash home slash spoken slash test2 '''and press''' Enter'''.&lt;br /&gt;
&lt;br /&gt;
This will copy the file '''test1 '''from '''test d i r directory '''to''' home directory '''as '''test2'''.&lt;br /&gt;
&lt;br /&gt;
Type '''l s''' space '''slash home slash spoken '''and press''' Enter'''.&lt;br /&gt;
&lt;br /&gt;
The output lists the contents of the directory.&lt;br /&gt;
&lt;br /&gt;
We can see that file '''test2''' is in the home directory.&lt;br /&gt;
|- &lt;br /&gt;
|| Type '''cp /home/spoken/testdir/test1 /home/spoken/''' and press''' Enter'''&lt;br /&gt;
|| To keep the same file name, we need not specify its name at the destination.&lt;br /&gt;
&lt;br /&gt;
Let’s type''' c p space slash home slash spoken slash test d i r slash test1 space slash home slash spoken '''and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
This will copy the file '''test1''' from '''slash home slash spoken slash test dir slash''' to the home directory.&lt;br /&gt;
&lt;br /&gt;
The destination file will also be named as '''test1'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Type '''cp test1 test3 '''press''' Enter'''&lt;br /&gt;
&lt;br /&gt;
Type '''cp test1 test4 '''press''' Enter'''&lt;br /&gt;
&lt;br /&gt;
Type '''ls '''press '''Enter'''&lt;br /&gt;
&lt;br /&gt;
Highlight '''test1, test2, test3''' and '''test4'''&lt;br /&gt;
&lt;br /&gt;
Type: '''cp test3 test4 /home/spoken '''and press''' Enter.'''&lt;br /&gt;
&lt;br /&gt;
Point to''' test3''' and '''test4 '''in the''' home directory.'''&lt;br /&gt;
|| While copying multiple files, we need not specify the destination file name.&lt;br /&gt;
&lt;br /&gt;
First, let us create more files by copying from the existing file.&lt;br /&gt;
&lt;br /&gt;
Type '''c p space test1 space test3 '''and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
Again type '''c p space test1 space test4 '''and press''' Enter'''.&lt;br /&gt;
&lt;br /&gt;
To list the files type''' l s '''and press''' Enter'''.&lt;br /&gt;
&lt;br /&gt;
Output shows that '''test1''', '''test2''',''' test3''' and '''test4''' are in the current directory.&lt;br /&gt;
&lt;br /&gt;
Now let us copy multiple files to the parent directory.&lt;br /&gt;
&lt;br /&gt;
Type '''c p space test3 space test4 space slash home slash spoken'''.&lt;br /&gt;
&lt;br /&gt;
Now''' test3''' and '''test4''' are also copied to the home directory.&lt;br /&gt;
&lt;br /&gt;
Notice that all files are copied to the home directory with the same names.&lt;br /&gt;
|- &lt;br /&gt;
|| Type '''cd .. '''and press '''Enter.'''&lt;br /&gt;
&lt;br /&gt;
Highlight the home directoryType '''cp testdir/ test '''and''' '''press''' Enter'''.&lt;br /&gt;
&lt;br /&gt;
Highlight '''cp: -r not specified; omitting directory 'testdir/''''&lt;br /&gt;
&lt;br /&gt;
'''Type cp -R testdir/ test '''and press''' Enter.'''&lt;br /&gt;
&lt;br /&gt;
Point to '''test''' folder&lt;br /&gt;
&lt;br /&gt;
Type '''ls '''and''' '''press''' Enter.'''&lt;br /&gt;
&lt;br /&gt;
Type''' ls test '''and''' '''press''' Enter.'''&lt;br /&gt;
|| Let’s type '''c d space dot dot '''and press''' Enter''' to move to the parent directory.&lt;br /&gt;
&lt;br /&gt;
Let’s type''' c p space test d i r0 slash space test '''and''' '''press''' Enter'''.&lt;br /&gt;
&lt;br /&gt;
Here we get an error;&lt;br /&gt;
&lt;br /&gt;
'''hyphen r not specified; omitting directory test dir slash.'''&lt;br /&gt;
&lt;br /&gt;
Normally, the '''c p''' command cannot copy directories with files.&lt;br /&gt;
&lt;br /&gt;
Using the '''hyphen R''' option with '''c p '''allows us to copy them.&lt;br /&gt;
&lt;br /&gt;
Type '''c p space hyphen R space test dir slash space test''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
Observe that it copied the entire''' testdir directory '''recursively.&lt;br /&gt;
&lt;br /&gt;
All files and subdirectories were copied into a new directory named''' test.'''&lt;br /&gt;
&lt;br /&gt;
Type '''l s''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
We can see a directory named''' test'''.&lt;br /&gt;
&lt;br /&gt;
Now type '''l s''' '''space''' '''test''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
The output lists the files present in the '''test''' directory.&lt;br /&gt;
&lt;br /&gt;
If '''test''' does not exist, it is created as a copy of '''test dir'''.If the '''test''' exists, '''test dir''' is copied inside it as a subdirectory.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 7'''&lt;br /&gt;
&lt;br /&gt;
'''mv command'''&lt;br /&gt;
* The '''mv''' command moves files and directories.&lt;br /&gt;
* It is used to rename files or directory or move them to another directory.&lt;br /&gt;
* Unlike the cp command, mv does not create a copy of the file.&lt;br /&gt;
|| The '''m v''' command moves files and directories.&lt;br /&gt;
&lt;br /&gt;
It is used to rename files or directory or move them to another directory.&lt;br /&gt;
&lt;br /&gt;
Unlike the '''c p''' command, '''m v''' does not create a copy of the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Type '''mv test1 test2 '''and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
Type '''cat &amp;gt;test1''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
Type the prompt: '''I am using Linux.''' and press '''Enter'''.Press '''ctrl''' and '''D''' '''keys''' together.&lt;br /&gt;
&lt;br /&gt;
Type '''mv -i test2 test3 '''press''' Enter'''&lt;br /&gt;
&lt;br /&gt;
Prompt asks: '''overwrite test3?'''&lt;br /&gt;
&lt;br /&gt;
Type '''no '''press''' Enter'''&lt;br /&gt;
|| In the terminal, type '''m v space test1 space test2''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
This renames the file '''test1''' to '''test2'''.&lt;br /&gt;
&lt;br /&gt;
If '''test2''' already exists, it is overwritten without warning.Let us again create '''test1''' file by using the '''cat''' command.&lt;br /&gt;
&lt;br /&gt;
Now type '''m v space hyphen i space test2 space test3''' and press '''Enter'''.The '''hyphen i''' option asks for confirmation before overwriting the files.&lt;br /&gt;
&lt;br /&gt;
Prompt asks: '''overwrite test3 question mark'''&lt;br /&gt;
&lt;br /&gt;
Type '''no '''and press''' Enter'''.&lt;br /&gt;
&lt;br /&gt;
This will not overwrite the '''test3''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| Type '''mv test2 test3 test4 /home/spoken/testdir '''and''' '''press''' Enter'''.&lt;br /&gt;
&lt;br /&gt;
Type '''ls /home/spoken/testdir '''press '''Enter'''&lt;br /&gt;
|| Like '''c p''',''' m v''' can move multiple files, but the destination must be a directory.&lt;br /&gt;
&lt;br /&gt;
Type '''m v space test2 space test3 space test4 space slash home slash spoken slash test dir '''and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
This command moves the files '''test2''', '''test3''', and '''test4''' to the specified directory.&lt;br /&gt;
&lt;br /&gt;
Press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
Files are moved from the current directory to '''slash home slash spoken slash test dir '''directory.&lt;br /&gt;
&lt;br /&gt;
To check, type''' l s space slash home slash spoken slash test dir '''and''' '''press''' Enter'''.&lt;br /&gt;
&lt;br /&gt;
The output shows that the files have been moved.&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| The next command is '''r m'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''' '''8'''&lt;br /&gt;
&lt;br /&gt;
'''rm command'''&lt;br /&gt;
* The '''rm''' command in Linux is used to remove files and directories.&lt;br /&gt;
* It permanently deletes the specified files from the system&lt;br /&gt;
|| The '''r m''' command in Linux is used to remove files and directories.&lt;br /&gt;
&lt;br /&gt;
It permanently deletes the specified files from the system.&lt;br /&gt;
|- &lt;br /&gt;
|| Show Terminal and Files side by side. Type''' rm testdir/test1 and '''press '''Enter.'''&lt;br /&gt;
&lt;br /&gt;
Type''' rm testdir/test2 testdir/test3 '''press''' Enter'''&lt;br /&gt;
&lt;br /&gt;
'''Highlight test4 file.'''&lt;br /&gt;
|| Type '''r m space test dir slash test1 '''and''' '''press '''Enter.'''&lt;br /&gt;
&lt;br /&gt;
This removes the file '''test1''' from the '''test dir''' directory.&lt;br /&gt;
&lt;br /&gt;
We can use it with multiple files also.&lt;br /&gt;
&lt;br /&gt;
Type''' r m space test dir slash test2 space test dir slash test3 '''press''' Enter'''.This will remove the files '''test2''' and '''test3'''.&lt;br /&gt;
&lt;br /&gt;
Only '''test4''' is available in the '''test dir''' directory.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 9'''&lt;br /&gt;
&lt;br /&gt;
'''-f and -r option'''&lt;br /&gt;
* Use the '''-f '''option to force deletion.&lt;br /&gt;
* The '''-r '''option is commonly used to remove directories recursively.&lt;br /&gt;
* '''rm''' deletes files.&lt;br /&gt;
* '''rmdir''' deletes only empty directories.&lt;br /&gt;
* To delete a directory containing files and subdirectories, use both options together: '''rm''' '''-rf'''.&lt;br /&gt;
|| Sometimes a file is write-protected, and '''rm''' cannot delete it.&lt;br /&gt;
&lt;br /&gt;
The '''hyphen f '''option forces deletion, even for write-protected items.&lt;br /&gt;
&lt;br /&gt;
The '''hyphen r''' option removes directories and their contents recursively.&lt;br /&gt;
&lt;br /&gt;
The '''r m''' command removes files.&lt;br /&gt;
&lt;br /&gt;
The '''r m dir''' command removes empty directories only.&lt;br /&gt;
&lt;br /&gt;
To delete a directory with files and subfolders, use '''r m hyphen r f '''together.&lt;br /&gt;
|- &lt;br /&gt;
|| Highlight '''testdir folder'''Type''' rm -rf testdir '''press''' EnterHighlight it is removed from files'''Type '''ls '''press '''Enter'''&lt;br /&gt;
|| Type''' r m space hyphen r f space test dir '''and''' '''press''' Enter'''.&lt;br /&gt;
&lt;br /&gt;
This deletes '''test dir''' and all its files and subdirectories recursively.&lt;br /&gt;
&lt;br /&gt;
Type: '''l s''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
Observe that the''' test dir''' directory is deleted.&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| Sometimes we need to check whether two files are identical.&lt;br /&gt;
&lt;br /&gt;
If they are the same, we can delete one of them.&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| For this, we use the '''c m p''' command.&lt;br /&gt;
&lt;br /&gt;
But first let’s learn what '''cmp''' command is?&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 10'''&lt;br /&gt;
&lt;br /&gt;
'''cmp commands'''&lt;br /&gt;
* '''cmp''' compares two files '''byte by byte'''.&lt;br /&gt;
* If the files are identical, it shows no output, only the prompt.&lt;br /&gt;
* If there are differences, '''cmp''' shows the location of the first mismatch.&lt;br /&gt;
|| &lt;br /&gt;
* '''c m p''' compares two files '''byte by byte'''.&lt;br /&gt;
* If the files are identical, it shows no output, only the prompt.&lt;br /&gt;
* If there are differences, '''c m p''' shows the location of the first mismatch.&lt;br /&gt;
|- &lt;br /&gt;
|| Type''' cat &amp;gt;sample1 '''press''' EnterType: '''This is a Linux file. &lt;br /&gt;
&lt;br /&gt;
Press''' Ctrl '''and''' D '''keys''' '''together''' Type cat &amp;gt;sample2 '''press''' EnterType: '''This is a Unix file.&lt;br /&gt;
&lt;br /&gt;
Press''' Ctrl '''and''' D '''keys''' '''together.&lt;br /&gt;
|| Let us see how the '''c m p command''' works. &lt;br /&gt;
&lt;br /&gt;
We will create two sample files '''sample 1''' and '''sample 2''' using the '''cat''' command.&lt;br /&gt;
&lt;br /&gt;
Create two files with '''cat''':&lt;br /&gt;
* '''sample1''': This is a Linux file.&lt;br /&gt;
* '''sample2''': This is a Unix file.&lt;br /&gt;
|- &lt;br /&gt;
|| Type''' cmp sample1 sample2 '''press '''Enter.&lt;br /&gt;
&lt;br /&gt;
Highlight:sample1 sample2 differ: byte 11, line 1'''&lt;br /&gt;
&lt;br /&gt;
|| Type''' c m p space sample1 space sample2 '''press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
We can see how the differences between the first and second file are highlighted.&lt;br /&gt;
&lt;br /&gt;
Output is shown as''' sample1 sample2 differ: byte 11''',''' line 1'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Type''' cat sample2 '''press '''Enter'''&lt;br /&gt;
&lt;br /&gt;
Type''' wc sample2 '''press '''Enter'''&lt;br /&gt;
&lt;br /&gt;
'''Highlight output'''&lt;br /&gt;
|| Next we will see the '''wc''' command.'''w c''' counts the number of lines, words, and characters in a file.&lt;br /&gt;
&lt;br /&gt;
For example, Type '''cat''' '''space''' '''sample2''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
The file '''sample2''' contains some text.&lt;br /&gt;
&lt;br /&gt;
Now Type '''w c space sample2''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
Using '''w c''', we see it has '''1 line''',''' 5 words''', '''and 21 characters'''.&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| With this we come to the end of this tutorial.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 11'''&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have learnt to:&lt;br /&gt;
* Copy, move, and delete regular files in Linux&lt;br /&gt;
* Use file-handling commands such as '''cp''', '''mv''', and '''rm'''&lt;br /&gt;
* Compare files and count lines, words, and characters using '''cmp''' and '''wc'''&lt;br /&gt;
* Use important command options to manage files safely&lt;br /&gt;
|| Let us summarise.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 12'''&lt;br /&gt;
&lt;br /&gt;
As an assignment,&lt;br /&gt;
# Copy one file to another directory using '''cp''' and verify the contents.&lt;br /&gt;
# Use '''cp''' '''-i''' and '''cp''' '''-b''' to observe how Linux prevents accidental overwriting.&lt;br /&gt;
# Compare two files using '''cmp''' and note the position of the first difference.&lt;br /&gt;
# Use the '''wc''' command to find the number of lines, words, and characters in a file.&lt;br /&gt;
|| As an assignment, please do the following.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 13'''&lt;br /&gt;
&lt;br /&gt;
'''Thank you'''&lt;br /&gt;
|| This Spoken Tutorial is brought to you by EduPyramids Educational Services Private Limited SINE IIT Bombay. Thank you.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ketkinaina</name></author>	</entry>

	</feed>