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

Re: A-posteriori use of another HDD for the /home/username



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Using rsync is easier, I admit it. When one needs to do something
quicky, he often looks for the easiest solution to do it. Sometimes,
he does not understand wholly this easiest solution. But he does not
care: it works. Another solution would be fine, but it needs to
investigate more concepts.

Encountering such a situation, some directly use the easiest
solution. Some do not, and try to use a less easy solution.

For me, mastering one tool is a better thing than knowing a little bit
lots of tools. This is just a point of view.

As cp is one of the most interesting commands in UNIX/Linux, it needs,
as every general command, to be fully understood. That is not my case,
but I prefer trying to understand how to use cp than directly jumping
on a tool for which I know it works, but which will not make me
discover new things.

The stuff with cp is actually complicated, but here are some cases,
which I am not 100% sure about:

$ cp *.* -> does not copy the .* files, i.e. does not copy files beginning with a
dot, and ending with whatever you can imagine. That should (AFAIK) be
due to the following fact:

$ cp *.*
is equivalent to
$ cd . ; cp *

A second case is

$ cp .*
is equivalent to
$ cd . ; cp *

A third case is
$ cp .[a-zA-Z0-9]*
which is equivalent to copy everything beginning with a dot, and
ending with whatever you can imagine.

Consequently, using
$ cp .[a-zA-Z0-9]*

and the mere (after or before)
$ cp *

should copy all the files of a directory to another (they were
evidently not specified here, as it is trivial stuff).

I could be wrong for at least one of these facts. If so, we can
discuss on it. The syntax is actually weird when one begins to play
with special files. For sure.


- -- 
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAktBFZMACgkQM0LLzLt8Mhz5qgCgna9D7ukGsrfV5gqSr4FY8WQj
Lr0AoJPb/6KeCIUFgUWiyPr3FPdCRZsD
=IL1w
-----END PGP SIGNATURE-----


Reply to: