<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://htyp.org/mw/index.php?action=history&amp;feed=atom&amp;title=Linux%2Ffile%2Fcmd</id>
	<title>Linux/file/cmd - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://htyp.org/mw/index.php?action=history&amp;feed=atom&amp;title=Linux%2Ffile%2Fcmd"/>
	<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=Linux/file/cmd&amp;action=history"/>
	<updated>2026-08-12T18:22:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://htyp.org/mw/index.php?title=Linux/file/cmd&amp;diff=28710&amp;oldid=prev</id>
		<title>Woozle at 23:04, 13 November 2022</title>
		<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=Linux/file/cmd&amp;diff=28710&amp;oldid=prev"/>
		<updated>2022-11-13T23:04:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:04, 13 November 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;[[Computing]]: [[Software]]: [[Operating Systems]]: [[Linux]]: [[{{PAGENAME}}|file/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;directory &lt;/del&gt;command syntax]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;[[Computing]]: [[Software]]: [[Operating Systems]]: [[Linux]]: [[{{PAGENAME}}|file/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;folder &lt;/ins&gt;command syntax]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;seed&lt;/del&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;fmt/title|Linux file/folder commands and syntax&lt;/ins&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Notes==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Notes==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;directoryname plus slash plus asterisk&amp;#039;&amp;#039; (&amp;lt;u&amp;gt;directoryname/*&amp;lt;/u&amp;gt;) as a source means &amp;quot;the contents of &amp;lt;u&amp;gt;directoryname&amp;lt;/u&amp;gt;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;directoryname plus slash plus asterisk&amp;#039;&amp;#039; (&amp;lt;u&amp;gt;directoryname/*&amp;lt;/u&amp;gt;) as a source means &amp;quot;the contents of &amp;lt;u&amp;gt;directoryname&amp;lt;/u&amp;gt;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l6&quot;&gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* A slash preceding the [[filespec]] indicates the root of the filesystem&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* A slash preceding the [[filespec]] indicates the root of the filesystem&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The Linux filesystem does not have the concept of &amp;quot;drives&amp;quot;; all drives are mapped into the filesystem, either at the root or via a mount. Anything not mounted may only be accessed via a protocol (such as [[Samba|smb://]], [[FTP|ftp://]], [[HTTP|http://]], etc.), and the native Linux file commands (mv, cp, etc.) do not understand protocols.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The Linux filesystem does not have the concept of &amp;quot;drives&amp;quot;; all drives are mapped into the filesystem, either at the root or via a mount. Anything not mounted may only be accessed via a protocol (such as [[Samba|smb://]], [[FTP|ftp://]], [[HTTP|http://]], etc.), and the native Linux file commands (mv, cp, etc.) do not understand protocols.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;* Some systems may have different defaults, often accomplished by {{&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Linuxcmd&lt;/del&gt;|alias}}ing the command to command-with-options&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;* Some systems may have different defaults, often accomplished by {{&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;l/cmd&lt;/ins&gt;|alias}}ing the command to command-with-options&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Examples==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Examples==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; To move the contents of directory &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; into directory &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; To move the contents of directory &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; into directory &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Linuxcmd&lt;/del&gt;|mv}} &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt;/* &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt;/&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;l/cmd&lt;/ins&gt;|mv}} &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt;/* &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt;/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Linuxcmd&lt;/del&gt;|mv}} &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt;/* &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt; {{faint|the terminating slash doesn&#039;t have any effect}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;l/cmd&lt;/ins&gt;|mv}} &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt;/* &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt; {{faint|the terminating slash doesn&#039;t have any effect}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; To move directory &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; into directory &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; To move directory &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; into directory &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Linuxcmd&lt;/del&gt;|mv}} &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;l/cmd&lt;/ins&gt;|mv}} &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; To copy the directory &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; into directory &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt; (so you end up with &amp;lt;u&amp;gt;/B/A/&amp;#039;&amp;#039;contents-of-A&amp;#039;&amp;#039;&amp;lt;/u&amp;gt;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; To copy the directory &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; into directory &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt; (so you end up with &amp;lt;u&amp;gt;/B/A/&amp;#039;&amp;#039;contents-of-A&amp;#039;&amp;#039;&amp;lt;/u&amp;gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Linuxcmd&lt;/del&gt;|cp}} -dpR &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt; {{faint|don&#039;t follow symbolic links, preserve attributes, recursive}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;l/cmd&lt;/ins&gt;|cp}} -dpR &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt; {{faint|don&#039;t follow symbolic links, preserve attributes, recursive}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Linuxcmd&lt;/del&gt;|cp}} -a &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt; {{faint|-a is an alias for -dpR}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;l/cmd&lt;/ins&gt;|cp}} -a &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt; {{faint|-a is an alias for -dpR}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; To copy the &amp;#039;&amp;#039;contents&amp;#039;&amp;#039; of &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; into &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt; (so you end up with &amp;lt;u&amp;gt;B/&amp;#039;&amp;#039;contents-of-A&amp;#039;&amp;#039;&amp;lt;/u&amp;gt;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; To copy the &amp;#039;&amp;#039;contents&amp;#039;&amp;#039; of &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; into &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt; (so you end up with &amp;lt;u&amp;gt;B/&amp;#039;&amp;#039;contents-of-A&amp;#039;&amp;#039;&amp;lt;/u&amp;gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Linuxcmd&lt;/del&gt;|cp}} -a &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt;/* &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt; {{faint|this has not been tested!}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;l/cmd&lt;/ins&gt;|cp}} -a &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt;/* &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt; {{faint|this has not been tested!}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; To remove everything, including subdirectories, from the current directory (careful!)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; To remove everything, including subdirectories, from the current directory (careful!)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Linuxcmd&lt;/del&gt;|rm}} -r * {{faint|confirms each file before deleting}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;l/cmd&lt;/ins&gt;|rm}} -r * {{faint|confirms each file before deleting}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Linuxcmd&lt;/del&gt;|rm}} -rf * {{faint|deletes all files/directories without asking}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;l/cmd&lt;/ins&gt;|rm}} -rf * {{faint|deletes all files/directories without asking}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Notes for DOS refugees==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Notes for DOS refugees==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;Some command utilities in DOS (e.g. xcopy) used a convention wherein a trailing backslash on a name (e.g. c:\name\) meant that the name was a directory. This helped to disambiguate in certain circumstances where a name might refer to either a directory or a file   &amp;amp;ndash; that is, you couldn&#039;t have a file with the same name as a directory, but (a) the command might involve a search where the first item with that name could be either a file or a directory, or (b) the command might involve creating something new (a file or directory) and the actions to be taken would depend on what was being created.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;Some command utilities in &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/ins&gt;DOS&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]] &lt;/ins&gt;(e.g. xcopy) used a convention wherein a trailing backslash on a name (e.g. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;tt&amp;gt;&lt;/ins&gt;c:\name\&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/tt&amp;gt;&lt;/ins&gt;) meant that the name was a directory. This helped to disambiguate in certain circumstances where a name might refer to either a directory or a file   &amp;amp;ndash; that is, you couldn&#039;t have a file with the same name as a directory, but (a) the command might involve a search where the first item with that name could be either a file or a directory, or (b) the command might involve creating something new (a file or directory) and the actions to be taken would depend on what was being created.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;For {{&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Linuxcmd&lt;/del&gt;|mv}} and {{&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Linuxcmd&lt;/del&gt;|cp}}, apparently &quot;name&quot; and &quot;name/&quot; as a &#039;&#039;source&#039;&#039; both indicate &quot;whatever you find that has this name&quot; (to check: can &quot;name/&quot; be a file?), while &quot;name/*&quot; means &quot;the contents of the directory named &quot;name&quot;. It&#039;s not yet clear if this is a general rule or only applicable with some commands.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;For {{&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;l/cmd&lt;/ins&gt;|mv}} and {{&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;l/cmd&lt;/ins&gt;|cp}}, apparently &quot;name&quot; and &quot;name/&quot; as a &#039;&#039;source&#039;&#039; both indicate &quot;whatever you find that has this name&quot; (to check: can &quot;name/&quot; be a file?), while &quot;name/*&quot; means &quot;the contents of the directory named &quot;name&quot;. It&#039;s not yet clear if this is a general rule or only applicable with some commands.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Woozle</name></author>
	</entry>
	<entry>
		<id>https://htyp.org/mw/index.php?title=Linux/file/cmd&amp;diff=28708&amp;oldid=prev</id>
		<title>Woozle: Woozle moved page Linux file/directory command syntax to Linux/file/cmd: reorganizing command pages</title>
		<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=Linux/file/cmd&amp;diff=28708&amp;oldid=prev"/>
		<updated>2022-11-13T23:00:42Z</updated>

		<summary type="html">&lt;p&gt;Woozle moved page &lt;a href=&quot;/Linux_file/directory_command_syntax&quot; class=&quot;mw-redirect&quot; title=&quot;Linux file/directory command syntax&quot;&gt;Linux file/directory command syntax&lt;/a&gt; to &lt;a href=&quot;/Linux/file/cmd&quot; title=&quot;Linux/file/cmd&quot;&gt;Linux/file/cmd&lt;/a&gt;: reorganizing command pages&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:00, 13 November 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&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>Woozle</name></author>
	</entry>
	<entry>
		<id>https://htyp.org/mw/index.php?title=Linux/file/cmd&amp;diff=4035&amp;oldid=prev</id>
		<title>Woozle at 01:45, 10 April 2006</title>
		<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=Linux/file/cmd&amp;diff=4035&amp;oldid=prev"/>
		<updated>2006-04-10T01:45:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Computing]]: [[Software]]: [[Operating Systems]]: [[Linux]]: [[{{PAGENAME}}|file/directory command syntax]]&lt;br /&gt;
{{seed}}&lt;br /&gt;
==Notes==&lt;br /&gt;
* &amp;#039;&amp;#039;directoryname plus slash plus asterisk&amp;#039;&amp;#039; (&amp;lt;u&amp;gt;directoryname/*&amp;lt;/u&amp;gt;) as a source means &amp;quot;the contents of &amp;lt;u&amp;gt;directoryname&amp;lt;/u&amp;gt;&amp;quot;&lt;br /&gt;
* A slash after a directory name (as in &amp;lt;u&amp;gt;directoryname/&amp;lt;/u&amp;gt;) is optional and not significant&lt;br /&gt;
* A slash preceding the [[filespec]] indicates the root of the filesystem&lt;br /&gt;
* The Linux filesystem does not have the concept of &amp;quot;drives&amp;quot;; all drives are mapped into the filesystem, either at the root or via a mount. Anything not mounted may only be accessed via a protocol (such as [[Samba|smb://]], [[FTP|ftp://]], [[HTTP|http://]], etc.), and the native Linux file commands (mv, cp, etc.) do not understand protocols.&lt;br /&gt;
* Some systems may have different defaults, often accomplished by {{Linuxcmd|alias}}ing the command to command-with-options&lt;br /&gt;
==Examples==&lt;br /&gt;
; To move the contents of directory &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; into directory &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt;&lt;br /&gt;
: {{Linuxcmd|mv}} &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt;/* &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt;/&lt;br /&gt;
: {{Linuxcmd|mv}} &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt;/* &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt; {{faint|the terminating slash doesn&amp;#039;t have any effect}}&lt;br /&gt;
; To move directory &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; into directory &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt;&lt;br /&gt;
: {{Linuxcmd|mv}} &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt;&lt;br /&gt;
; To copy the directory &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; into directory &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt; (so you end up with &amp;lt;u&amp;gt;/B/A/&amp;#039;&amp;#039;contents-of-A&amp;#039;&amp;#039;&amp;lt;/u&amp;gt;)&lt;br /&gt;
: {{Linuxcmd|cp}} -dpR &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt; {{faint|don&amp;#039;t follow symbolic links, preserve attributes, recursive}}&lt;br /&gt;
: {{Linuxcmd|cp}} -a &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt; {{faint|-a is an alias for -dpR}}&lt;br /&gt;
; To copy the &amp;#039;&amp;#039;contents&amp;#039;&amp;#039; of &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt; into &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt; (so you end up with &amp;lt;u&amp;gt;B/&amp;#039;&amp;#039;contents-of-A&amp;#039;&amp;#039;&amp;lt;/u&amp;gt;)&lt;br /&gt;
: {{Linuxcmd|cp}} -a &amp;lt;u&amp;gt;A&amp;lt;/u&amp;gt;/* &amp;lt;u&amp;gt;B&amp;lt;/u&amp;gt; {{faint|this has not been tested!}}&lt;br /&gt;
; To remove everything, including subdirectories, from the current directory (careful!)&lt;br /&gt;
: {{Linuxcmd|rm}} -r * {{faint|confirms each file before deleting}}&lt;br /&gt;
: {{Linuxcmd|rm}} -rf * {{faint|deletes all files/directories without asking}}&lt;br /&gt;
==Notes for DOS refugees==&lt;br /&gt;
Some command utilities in DOS (e.g. xcopy) used a convention wherein a trailing backslash on a name (e.g. c:\name\) meant that the name was a directory. This helped to disambiguate in certain circumstances where a name might refer to either a directory or a file   &amp;amp;ndash; that is, you couldn&amp;#039;t have a file with the same name as a directory, but (a) the command might involve a search where the first item with that name could be either a file or a directory, or (b) the command might involve creating something new (a file or directory) and the actions to be taken would depend on what was being created.&lt;br /&gt;
&lt;br /&gt;
For {{Linuxcmd|mv}} and {{Linuxcmd|cp}}, apparently &amp;quot;name&amp;quot; and &amp;quot;name/&amp;quot; as a &amp;#039;&amp;#039;source&amp;#039;&amp;#039; both indicate &amp;quot;whatever you find that has this name&amp;quot; (to check: can &amp;quot;name/&amp;quot; be a file?), while &amp;quot;name/*&amp;quot; means &amp;quot;the contents of the directory named &amp;quot;name&amp;quot;. It&amp;#039;s not yet clear if this is a general rule or only applicable with some commands.&lt;/div&gt;</summary>
		<author><name>Woozle</name></author>
	</entry>
</feed>