[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [TEKNIK] Kopiering af dot-filer...



On 2010-04-28 21:48, Verner Kjærsgaard wrote:

Thor Tall skrev:
Du kunne prøve
cp -Rp .[ -z]* /tmp/dot

/Thor


----- Original Message ----
From: Verner Kjærsgaard<sslug@sslug>
To: sslug@sslug
Sent: Wed, April 28, 2010 9:35:38 PM
Subject: [TEKNIK] Kopiering af dot-filer...

- tænk jeg ved ikke det her...sorry
- det er sikkert indlysende, ok, here goes...

Jeg har brug for at vide, hvorledes man kopierer dot-directories fra et
sted til et andet (recursivt). Altså eksempelvis

kopier -Rp .mozilla /tmp/somewhere

Det virker fint, men nu vil jeg jo gerne kopiere en bunke dot
biblioteker samtidigt...

Denne konstruktion her virker jo ikke:

cp -Rp .* /tmp/dot

- fordi det indledende punktum i den her sammenhæng jo af bash
oversættes til 'dette bibliotek'.
- så det gælder vel om at få det indledende dot 'escaped' på en eller
anden måde.

Alle ideer er velkomne.


- tak for ideen, eh...den virker ikke. Og heller ikke med en space
mellem 'z' og ']'.
- her er fejlen: cp: ugyldigt flag -- z
- hvad var din ide?

Tror muligvis Thor lavede en lille typo...

hvis du skriver [a-z] på komandolinien (i bash) bliver det tolket som en regular expression som matcher alle filer der hedder a b c d .... x y z. Så hvis du skriver:

cp -Rp .[a-z]* destinations_mappe

så skulle der matche alle filer/mapper der starter med .a .b .c ... .x .y .z
For at få det hele med skal du nok bruge noget ligende dette:

cp -Rp .[a-zA-Z0-9]* destinations_mappe

- Lasse




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2010-05-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *