<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://stab.st-andrews.ac.uk/wiki/index.php?action=history&amp;feed=atom&amp;title=Hdi2u_S17</id>
		<title>Hdi2u S17 - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://stab.st-andrews.ac.uk/wiki/index.php?action=history&amp;feed=atom&amp;title=Hdi2u_S17"/>
		<link rel="alternate" type="text/html" href="http://stab.st-andrews.ac.uk/wiki/index.php?title=Hdi2u_S17&amp;action=history"/>
		<updated>2026-04-25T07:38:00Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://stab.st-andrews.ac.uk/wiki/index.php?title=Hdi2u_S17&amp;diff=1406&amp;oldid=prev</id>
		<title>Rf: Created page with &quot;= Copying files and directories =  * The basic command used to copy files using the command line is &lt;code&gt;cp&lt;/code&gt;. * At a minimum, you must specify two arguments: the name o...&quot;</title>
		<link rel="alternate" type="text/html" href="http://stab.st-andrews.ac.uk/wiki/index.php?title=Hdi2u_S17&amp;diff=1406&amp;oldid=prev"/>
				<updated>2017-04-19T22:35:47Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Copying files and directories =  * The basic command used to copy files using the command line is &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt;. * At a minimum, you must specify two arguments: the name o...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Copying files and directories =&lt;br /&gt;
&lt;br /&gt;
* The basic command used to copy files using the command line is &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt;.&lt;br /&gt;
* At a minimum, you must specify two arguments: the name of the file to be copied, and where you wish to copy the file to.&lt;br /&gt;
* The main things to know about using the cp command are:&lt;br /&gt;
* if you provide the name of an existing directory as the second argument, the file named in the first argument will be copied into that directory.&lt;br /&gt;
* otherwise, it will be assumed that the second argument is another name for the first file, a clone so to speak.&lt;br /&gt;
* if you provide more than two arguments to cp, the final argument needs to be the name of a directory&lt;br /&gt;
* This command it not harmless, if you choose a new name that happens to already be a file, that file will be overwritten.&lt;br /&gt;
&lt;br /&gt;
== Exercises ==&lt;br /&gt;
&lt;br /&gt;
 cp unknown.fasta my_new_file.fasta - clones unknown.fasta with the new name my_new_file.fasta&lt;br /&gt;
 cp unknown.fasta my_new_directory - probably not what you wanted! It just makes another file. ==&lt;br /&gt;
 mkdir an_actual_directory&lt;br /&gt;
 cp unknown.fasta an_actual_directory - copy unknown.fasta into an_actual_directory you just made&lt;br /&gt;
 cp *.embl an_actual_directory - copy all the .embl files into the new directory in one go&lt;br /&gt;
&lt;br /&gt;
* To copy whole directories, with all the subfiles and subdirectories, use the –R option, (meaning recursive).&lt;br /&gt;
 cp –R an_actual_directory foo&lt;br /&gt;
 cp –R ../blastdb .&lt;/div&gt;</summary>
		<author><name>Rf</name></author>	</entry>

	</feed>