[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: diferencia entre cp path y cp path/



On Fri, Dec 9, 2011 at 3:24 AM, alexander villalba
<alexvillalb159@gmail.com> wrote:
>
> aquí hay un link:
> http://serverfault.com/questions/279614/is-there-a-big-difference-between-this-is-a-path-and-this-is-a-path
>
>  en donde se da una pista de las diferencias
>
> pero no habla específicamente del caso para el comando cp. Una vez
> conseguí un enlace en donde se explicaba eso pero ahora no lo consigo.

Using commands like cp and mv, use of the trailing slash in the
destination acts as a bit of a safety net, since it forces the final
path component to be interpreted as a directory. Compare mv myfile
/some/path to mv myfile /some/path/ -- if /some/path does not exist,
the first version will create a file, while the second version will
fail with an error. If /some/path exists but is a file, the first
version will replace it, while the second version will again fail with
an error. – larsks Jun 12 at 19:02


--
Marc


Reply to: