<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
	<id>http://wiki.cabal.mx/index.php?action=history&amp;feed=atom&amp;title=Comandos_de_la_terminal%2Fcp</id>
	<title>Comandos de la terminal/cp - Historial de revisiones</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.cabal.mx/index.php?action=history&amp;feed=atom&amp;title=Comandos_de_la_terminal%2Fcp"/>
	<link rel="alternate" type="text/html" href="http://wiki.cabal.mx/index.php?title=Comandos_de_la_terminal/cp&amp;action=history"/>
	<updated>2026-04-19T12:32:07Z</updated>
	<subtitle>Historial de revisiones para esta página en el wiki</subtitle>
	<generator>MediaWiki 1.32.1</generator>
	<entry>
		<id>http://wiki.cabal.mx/index.php?title=Comandos_de_la_terminal/cp&amp;diff=5342&amp;oldid=prev</id>
		<title>Rrc en 21:05 4 abr 2014</title>
		<link rel="alternate" type="text/html" href="http://wiki.cabal.mx/index.php?title=Comandos_de_la_terminal/cp&amp;diff=5342&amp;oldid=prev"/>
		<updated>2014-04-04T21:05:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nueva&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
* [[:#cp | cp]]&lt;br /&gt;
&lt;br /&gt;
== cp ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[rrc@pridd ~]$ cp --help&lt;br /&gt;
Usage: cp [OPTION]... [-T] SOURCE DEST&lt;br /&gt;
  or:  cp [OPTION]... SOURCE... DIRECTORY&lt;br /&gt;
  or:  cp [OPTION]... -t DIRECTORY SOURCE...&lt;br /&gt;
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.&lt;br /&gt;
&lt;br /&gt;
Mandatory arguments to long options are mandatory for short options too.&lt;br /&gt;
  -a, --archive                same as -dR --preserve=all&lt;br /&gt;
      --attributes-only        don&amp;#039;t copy the file data, just the attributes&lt;br /&gt;
      --backup[=CONTROL]       make a backup of each existing destination file&lt;br /&gt;
  -b                           like --backup but does not accept an argument&lt;br /&gt;
      --copy-contents          copy contents of special files when recursive&lt;br /&gt;
  -d                           same as --no-dereference --preserve=links&lt;br /&gt;
  -f, --force                  if an existing destination file cannot be&lt;br /&gt;
                                 opened, remove it and try again (this option&lt;br /&gt;
                                 is ignored when the -n option is also used)&lt;br /&gt;
  -i, --interactive            prompt before overwrite (overrides a previous -n&lt;br /&gt;
                                  option)&lt;br /&gt;
  -H                           follow command-line symbolic links in SOURCE&lt;br /&gt;
  -l, --link                   hard link files instead of copying&lt;br /&gt;
  -L, --dereference            always follow symbolic links in SOURCE&lt;br /&gt;
  -n, --no-clobber             do not overwrite an existing file (overrides&lt;br /&gt;
                                 a previous -i option)&lt;br /&gt;
  -P, --no-dereference         never follow symbolic links in SOURCE&lt;br /&gt;
  -p                           same as --preserve=mode,ownership,timestamps&lt;br /&gt;
      --preserve[=ATTR_LIST]   preserve the specified attributes (default:&lt;br /&gt;
                                 mode,ownership,timestamps), if possible&lt;br /&gt;
                                 additional attributes: context, links, xattr,&lt;br /&gt;
                                 all&lt;br /&gt;
      --no-preserve=ATTR_LIST  don&amp;#039;t preserve the specified attributes&lt;br /&gt;
      --parents                use full source file name under DIRECTORY&lt;br /&gt;
  -R, -r, --recursive          copy directories recursively&lt;br /&gt;
      --reflink[=WHEN]         control clone/CoW copies. See below&lt;br /&gt;
      --remove-destination     remove each existing destination file before&lt;br /&gt;
                                 attempting to open it (contrast with --force)&lt;br /&gt;
      --sparse=WHEN            control creation of sparse files. See below&lt;br /&gt;
      --strip-trailing-slashes  remove any trailing slashes from each SOURCE&lt;br /&gt;
                                 argument&lt;br /&gt;
  -s, --symbolic-link          make symbolic links instead of copying&lt;br /&gt;
  -S, --suffix=SUFFIX          override the usual backup suffix&lt;br /&gt;
  -t, --target-directory=DIRECTORY  copy all SOURCE arguments into DIRECTORY&lt;br /&gt;
  -T, --no-target-directory    treat DEST as a normal file&lt;br /&gt;
  -u, --update                 copy only when the SOURCE file is newer&lt;br /&gt;
                                 than the destination file or when the&lt;br /&gt;
                                 destination file is missing&lt;br /&gt;
  -v, --verbose                explain what is being done&lt;br /&gt;
  -x, --one-file-system        stay on this file system&lt;br /&gt;
      --help     display this help and exit&lt;br /&gt;
      --version  output version information and exit&lt;br /&gt;
&lt;br /&gt;
By default, sparse SOURCE files are detected by a crude heuristic and the&lt;br /&gt;
corresponding DEST file is made sparse as well.  That is the behavior&lt;br /&gt;
selected by --sparse=auto.  Specify --sparse=always to create a sparse DEST&lt;br /&gt;
file whenever the SOURCE file contains a long enough sequence of zero bytes.&lt;br /&gt;
Use --sparse=never to inhibit creation of sparse files.&lt;br /&gt;
&lt;br /&gt;
When --reflink[=always] is specified, perform a lightweight copy, where the&lt;br /&gt;
data blocks are copied only when modified.  If this is not possible the copy&lt;br /&gt;
fails, or if --reflink=auto is specified, fall back to a standard copy.&lt;br /&gt;
&lt;br /&gt;
The backup suffix is &amp;#039;~&amp;#039;, unless set with --suffix or SIMPLE_BACKUP_SUFFIX.&lt;br /&gt;
The version control method may be selected via the --backup option or through&lt;br /&gt;
the VERSION_CONTROL environment variable.  Here are the values:&lt;br /&gt;
&lt;br /&gt;
  none, off       never make backups (even if --backup is given)&lt;br /&gt;
  numbered, t     make numbered backups&lt;br /&gt;
  existing, nil   numbered if numbered backups exist, simple otherwise&lt;br /&gt;
  simple, never   always make simple backups&lt;br /&gt;
&lt;br /&gt;
As a special case, cp makes a backup of SOURCE when the force and backup&lt;br /&gt;
options are given and SOURCE and DEST are the same name for an existing,&lt;br /&gt;
regular file.&lt;br /&gt;
&lt;br /&gt;
Report cp bugs to bug-coreutils@gnu.org&lt;br /&gt;
GNU coreutils home page: &amp;lt;http://www.gnu.org/software/coreutils/&amp;gt;&lt;br /&gt;
General help using GNU software: &amp;lt;http://www.gnu.org/gethelp/&amp;gt;&lt;br /&gt;
For complete documentation, run: info coreutils &amp;#039;cp invocation&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[rrc@pridd ~]$ cp --version&lt;br /&gt;
cp (GNU coreutils) 8.21&lt;br /&gt;
Copyright (C) 2013 Free Software Foundation, Inc.&lt;br /&gt;
License GPLv3+: GNU GPL version 3 or later &amp;lt;http://gnu.org/licenses/gpl.html&amp;gt;.&lt;br /&gt;
This is free software: you are free to change and redistribute it.&lt;br /&gt;
There is NO WARRANTY, to the extent permitted by law.&lt;br /&gt;
&lt;br /&gt;
Written by Torbjörn Granlund, David MacKenzie, and Jim Meyering.&lt;br /&gt;
&lt;br /&gt;
[rrc@Llawyr ComandosDeLaTerminal]$ alias cp&lt;br /&gt;
alias cp=&amp;#039;cp -i&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[rrc@Llawyr ComandosDeLaTerminal]$ unalias cp&lt;br /&gt;
&lt;br /&gt;
[rrc@Llawyr ComandosDeLaTerminal]$ cp SortFile Archivo1&lt;br /&gt;
&lt;br /&gt;
[rrc@Llawyr ComandosDeLaTerminal]$ diff SortFile Archivo1&lt;br /&gt;
&lt;br /&gt;
[rrc@Llawyr ComandosDeLaTerminal]$ alias cp=&amp;#039;cp -i&amp;#039;&lt;br /&gt;
[rrc@Llawyr ComandosDeLaTerminal]$ alias cp&lt;br /&gt;
alias cp=&amp;#039;cp -i&amp;#039;&lt;br /&gt;
[rrc@Llawyr ComandosDeLaTerminal]$ cp SortFile Archivo1&lt;br /&gt;
cp: overwrite ‘Archivo1’? y&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# cp /var/www/html/richard/index&lt;br /&gt;
index.es.html  index.html     &lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# cp /var/www/html/richard/index.html .&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# ls -al /var/www/html/richard/index.html &lt;br /&gt;
-rw-rw-r-- 1 rrc webmin 13242 Jun 25  2008 /var/www/html/richard/index.html&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# ls -al index.html &lt;br /&gt;
-rw-r--r-- 1 root root 13242 Apr  4 14:38 index.html&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# cp -p /var/www/html/richard/index.html index2.html&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# ls -al index2.html &lt;br /&gt;
-rw-rw-r-- 1 rrc webmin 13242 Jun 25  2008 index2.html&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# cp -s index.html index-s.html&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# ls -al index-s.html &lt;br /&gt;
lrwxrwxrwx 1 root root 10 Apr  4 14:49 index-s.html -&amp;gt; index.html&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# cp  /var/www/html/richard .&lt;br /&gt;
cp: omitting directory ‘/var/www/html/richard’&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# ls -al richard&lt;br /&gt;
ls: cannot access richard: No such file or directory&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# cp -r /var/www/html/richard richard2&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# ls -al richard2&lt;br /&gt;
total 72&lt;br /&gt;
drwxr-xr-x  3 root root  4096 Apr  4 14:54 ./&lt;br /&gt;
drwx------ 18 rrc  rrc   4096 Apr  4 14:54 ../&lt;br /&gt;
-rw-r--r--  1 root root  3320 Apr  4 14:54 evolution.es.html&lt;br /&gt;
-rw-r--r--  1 root root  3272 Apr  4 14:54 evolution.html&lt;br /&gt;
drwxr-xr-x  2 root root  4096 Apr  4 14:54 images/&lt;br /&gt;
-rw-r--r--  1 root root 14700 Apr  4 14:54 index.es.html&lt;br /&gt;
-rw-r--r--  1 root root 13242 Apr  4 14:54 index.html&lt;br /&gt;
-rw-r--r--  1 root root  4329 Apr  4 14:54 RichardSleeve.es.html&lt;br /&gt;
-rw-r--r--  1 root root  4328 Apr  4 14:54 RichardSleeve.html&lt;br /&gt;
-rw-r--r--  1 root root   489 Apr  4 14:54 robots.txt&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# ls -al /var/www/html/richard&lt;br /&gt;
total 72&lt;br /&gt;
drwxrwsr-x  3 rrc  webmin  4096 Jun 20  2013 ./&lt;br /&gt;
drwxr-xr-x 20 root root    4096 Oct 18 18:29 ../&lt;br /&gt;
-rw-rw-r--  1 rrc  webmin  3320 Jun 25  2008 evolution.es.html&lt;br /&gt;
-rw-rw-r--  1 rrc  webmin  3272 Jun 25  2008 evolution.html&lt;br /&gt;
drwxrwsr-x  2 rrc  webmin  4096 Jul  8  2008 images/&lt;br /&gt;
-rw-rw-r--  1 rrc  webmin 14700 Jul 10  2008 index.es.html&lt;br /&gt;
-rw-rw-r--  1 rrc  webmin 13242 Jun 25  2008 index.html&lt;br /&gt;
-rw-rw-r--  1 rrc  webmin  4329 Jun 25  2008 RichardSleeve.es.html&lt;br /&gt;
-rw-rw-r--  1 rrc  webmin  4328 Jun 25  2008 RichardSleeve.html&lt;br /&gt;
-rw-rw-r--  1 rrc  webmin   489 Jun 20  2013 robots.txt&lt;br /&gt;
 &lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# cp -a  /var/www/html/richard richard3&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# ls -al richard3&lt;br /&gt;
total 72&lt;br /&gt;
drwxrwsr-x  3 rrc webmin  4096 Jun 20  2013 ./&lt;br /&gt;
drwx------ 17 rrc rrc     4096 Apr  4 14:46 ../&lt;br /&gt;
-rw-rw-r--  1 rrc webmin  3320 Jun 25  2008 evolution.es.html&lt;br /&gt;
-rw-rw-r--  1 rrc webmin  3272 Jun 25  2008 evolution.html&lt;br /&gt;
drwxrwsr-x  2 rrc webmin  4096 Jul  8  2008 images/&lt;br /&gt;
-rw-rw-r--  1 rrc webmin 14700 Jul 10  2008 index.es.html&lt;br /&gt;
-rw-rw-r--  1 rrc webmin 13242 Jun 25  2008 index.html&lt;br /&gt;
-rw-rw-r--  1 rrc webmin  4329 Jun 25  2008 RichardSleeve.es.html&lt;br /&gt;
-rw-rw-r--  1 rrc webmin  4328 Jun 25  2008 RichardSleeve.html&lt;br /&gt;
-rw-rw-r--  1 rrc webmin   489 Jun 20  2013 robots.txt&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# cp -u /var/www/html/richard/* richard2&lt;br /&gt;
cp: omitting directory ‘/var/www/html/richard/images’&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# ls -al richard2&lt;br /&gt;
total 76&lt;br /&gt;
drwxr-xr-x  4 root root  4096 Apr  4 15:01 ./&lt;br /&gt;
drwx------ 18 rrc  rrc   4096 Apr  4 14:54 ../&lt;br /&gt;
-rw-r--r--  1 root root     0 Apr  4 15:01 DelMe&lt;br /&gt;
-rw-r--r--  1 root root  3320 Apr  4 14:54 evolution.es.html&lt;br /&gt;
-rw-r--r--  1 root root  3272 Apr  4 14:54 evolution.html&lt;br /&gt;
drwxr-xr-x  2 root root  4096 Apr  4 14:54 images/&lt;br /&gt;
-rw-r--r--  1 root root 14700 Apr  4 14:54 index.es.html&lt;br /&gt;
-rw-r--r--  1 root root 13242 Apr  4 14:54 index.html&lt;br /&gt;
drwxr-xr-x  3 root root  4096 Apr  4 15:00 richard/&lt;br /&gt;
-rw-r--r--  1 root root  4329 Apr  4 14:54 RichardSleeve.es.html&lt;br /&gt;
-rw-r--r--  1 root root  4328 Apr  4 14:54 RichardSleeve.html&lt;br /&gt;
-rw-r--r--  1 root root   489 Apr  4 14:54 robots.txt&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# touch /var/www/html/richard/DelMe2&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# cp -vu /var/www/html/richard/* richard2&lt;br /&gt;
‘/var/www/html/richard/DelMe2’ -&amp;gt; ‘richard2/DelMe2’&lt;br /&gt;
cp: omitting directory ‘/var/www/html/richard/images’&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# touch /var/www/html/richard/DelMe3&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# cp -vpu /var/www/html/richard/* richard2&lt;br /&gt;
‘/var/www/html/richard/DelMe3’ -&amp;gt; ‘richard2/DelMe3’&lt;br /&gt;
cp: omitting directory ‘/var/www/html/richard/images’&lt;br /&gt;
&lt;br /&gt;
[root@Llawyr ComandosDeLaTerminal]# ls -al richard2&lt;br /&gt;
total 76&lt;br /&gt;
drwxr-xr-x  4 root root    4096 Apr  4 15:04 ./&lt;br /&gt;
drwx------ 18 rrc  rrc     4096 Apr  4 14:54 ../&lt;br /&gt;
-rw-r--r--  1 root root       0 Apr  4 15:01 DelMe&lt;br /&gt;
-rw-r--r--  1 root root       0 Apr  4 15:03 DelMe2&lt;br /&gt;
-rw-r--r--  1 root webmin     0 Apr  4 15:04 DelMe3&lt;br /&gt;
-rw-r--r--  1 root root    3320 Apr  4 14:54 evolution.es.html&lt;br /&gt;
-rw-r--r--  1 root root    3272 Apr  4 14:54 evolution.html&lt;br /&gt;
drwxr-xr-x  2 root root    4096 Apr  4 14:54 images/&lt;br /&gt;
-rw-r--r--  1 root root   14700 Apr  4 14:54 index.es.html&lt;br /&gt;
-rw-r--r--  1 root root   13242 Apr  4 14:54 index.html&lt;br /&gt;
drwxr-xr-x  3 root root    4096 Apr  4 15:00 richard/&lt;br /&gt;
-rw-r--r--  1 root root    4329 Apr  4 14:54 RichardSleeve.es.html&lt;br /&gt;
-rw-r--r--  1 root root    4328 Apr  4 14:54 RichardSleeve.html&lt;br /&gt;
-rw-r--r--  1 root root     489 Apr  4 14:54 robots.txt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Comandos de la terminal]]&lt;/div&gt;</summary>
		<author><name>Rrc</name></author>
		
	</entry>
</feed>