I wrote:
> Hi Steve :)
>
> perhaps this can be useful, if we send it to the list, I'll send it to
> the list and send it bcc to you, because I don't think that this is OT.
>
> Steve [snip] wrote:
>>> 'cp -a *' will copy the '/mainfolder', '/a_folder_in_the_main_folder'
>>> and '.a_hidden_file_in_the_folder_that_is_in_the_main_folder', but it
>>> won't copy '.a_hidden_file_in_the_main_folder.txt'
>>>
>>
>> Try
>>
>> cp -a .
>>
>> Does this have the result you expect?
>>
>> The difference has nothing to do with the behaviour of cp. Think, what
>> does the * expand to in your shell? Try
>>
>> echo *
>>
>> and compare
>>
>> ls -a *
>> ls -a .
>>
>> If you expect the shell to do one thing, and it does another, it is
>> possible you have misunderstood how it works.
>>
>
> For me it's plausible to use
>
> ls -a
>
> without * or . and yes, I misunderstood how the wildcard * works, even
> if it worked the way I was using it with Linux since years.
>
> I googled for 'wildcards linux' maybe I should use
>
> {*,.[!.]*}
>
> instead of
>
> *
>
> in the future ;), even if * will work in nearly every case.
>
> It's not plausible for me, anyhow I'll read the German link about
> {*,.[!.]*} and wildcards in the future.
>
> Cheers,
> Ralf
>
> A German link about globbing:
> http://linuxseiten.kg-it.de/index.php?index=bash_globbing#bash_globbing
The blame is on me ...
spinymouse-s...@64studio:~$ mkdir ~/.mozilla/firefox/--TEST--.#2
spinymouse-s...@64studio:~$ cd ~/.mozilla/firefox/3ehxz5yh.default
spinymouse-s...@64studio:~/.mozilla/firefox/3ehxz5yh.default$ cp -a
{*,.[!.]*} ~/.mozilla/firefox/--TEST--.#2
spinymouse-s...@64studio:~/.mozilla/firefox/3ehxz5yh.default$ ls -al
~/.mozilla/firefox/--TEST--.#2
[snip]
-rw-r--r-- 1 spinymouse-sudo spinymouse-sudo 0 2009-05-01 12:07
.parentlock
[snip]
I should read the link I googled and I maybe should use {*,.[!.]*}
instead of * in the future.
I guess I'm not the only one who misunderstood the function of the
wildcard *.
_______________________________________________
64studio-users mailing list
[email protected]
http://lists.64studio.com/mailman/listinfo/64studio-users