Gustin Johnson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Ralf Mardorf wrote:
>   
>> Gustin Johnson wrote:
>>     
>>> Of course not, just running "cp *" from within the directory you are
>>> copying will only select regular files (ie. ones that do not start with
>>> ".").
>>>
>>> Doing a cp -a on the directory itself would be the easiest way to
>>> accomplish what you want.
>>>
>>> Personally, I no longer use cp, rsync does everything I need an more.
>>>   
>>>       
>> Hi Gustin :)
>>
>> okay, 'normally' I'm using rsync too. I didn't run cp *, but cp -a * and
>> it failed. Now I'll test rsync -r, resp. rsync -rvu.
>>
>>     
> cp -a .mozilla/firefox/3ehxz5yh.default/ .mozilla/firefox/--TEST--.#2
> would have worked for you.
>   

* won't work and / will work?!

> Doing it in two operations would have also worked:
> "cp -a * /path/to/destination/folder && cp -a .*
> /path/to/destination/folder"
>
> By the way, using "#", or any other unusual character in your file or
> directory names is asking for trouble, regardless of your OS.  This is
> particularly true if you are sharing files between different OSs.
>   

I agree, I told the Firefox ProfileManager to name a profile #1 and the 
manager named the folder ...#1. The blame is on the ProfileManager ;).

> <snip>
>
>   
>> spinymouse-s...@64studio:~$ rsync -rvu
>> .mozilla/firefox/3ehxz5yh.default/ .mozilla/firefox/--TEST--.#2
>> sending incremental file list
>> .parentlock
>> [snip]
>>
>> Hm, rsync is fine, it copied .parentlock too.
>>
>> Anyway, cp failed and it shouldn't fail.
>>     
>
> It didn't fail, it did exactly what you told it to do.  By default it
> ignored hidden files and folders.  You will notice similar behaviour
> with other command line tools, like du.
>   

Okay :S, I run 'ls -al' instead of 'ls -l', but 'cp --help' won't tell 
someone speaking broken English, how to copy 'hidden' files, while rsync 
simply copies hidden files.
If I copy a folder, anything in the folder should be copied by default. 
And why are 'hidden' folders and files in folders that are in the copied 
folder are copied, while 'hidden' files in the 'main' folder aren't copied?

>> The lesson is clear: cp is unsafe, using Nautilus or rsync will do the job.
>>
>>     
> No, cp is safe, unsafe is definitely the wrong word.  cp has its place,
> you just need to know how and when to use it, like every other tool.
>   

The way it works isn't plausible.

> Nautilus will only work in this case if you configure it to show hidden
> files and folders, which it it usually isn't set to do so by default.
>   

That's might be true, I configured Nautilus to show hidden files, like I 
set the -a option when I run ls. If I run cp -a I wish that the -a 
option will copy everything, rsync don't need an additional option to 
'archive' everything ;).

Okay, I'm not using cp in the right way, but the defaults for cp aren't 
plausible and I never noticed this behaviour before AND for example, 
rsync is fine without setting non-plausible options.

Cheers,
Ralf
_______________________________________________
64studio-users mailing list
[email protected]
http://lists.64studio.com/mailman/listinfo/64studio-users

Reply via email to