Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.os.unix.linux.misc > #124720
| From | Helmut Waitzmann <nn.throttle@xoxy.net> |
|---|---|
| Newsgroups | de.comp.os.unix.linux.misc |
| Subject | Re: rsync und vfat |
| Date | 2022-09-04 01:47 +0200 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <83h71oggvc.fsf@helmutwaitzmann.news.arcor.de> (permalink) |
| References | <tevpoe$q8t$1@news2.informatik.uni-stuttgart.de> <834jxoih4g.fsf@helmutwaitzmann.news.arcor.de> <tf05l5$qe1$2@news2.informatik.uni-stuttgart.de> |
Ulli Horlacher <framstag@rus.uni-stuttgart.de>:
> Helmut Waitzmann <nn.throttle@xoxy.net> wrote:
>> Ulli Horlacher <framstag@rus.uni-stuttgart.de>:
>>> Ich hab oefters das Problem, dass ich Dateien auf
>>> vfat kopieren will und dann mit dessen
>>> Dateinamen-Einschraenkungen zu kaempfen hab,
>>> weshalb rsync nicht anwendbar ist.
>>>
>>> Mir wuerde es voellig reichen, wenn die Dateien
>>> waehrend des Kopierens umgenannt werden, als zB
>>> s/:/_/
>>>
>>> rsync bietet so was aber nicht an.
>>>
>>>
>>> Also selber ein rsync-aehnliches tool schreiben?
>>>
>>>
>>> Aber da muss es doch was fertiges geben, ich bin
>>> doch nicht der Erste mit dem Problem?
>>
>> Wenn sich GNU?Tar für die Kopieraufgabe eignet,
>> wäre die Option «--transform=SED-EXPR» vielleicht
>> eine Möglichkeit, Dateinamen im Vorübergehen
>> umzubenennen:
>>
>>
>> ( cd -- "$quelle" && tar cf - . ) |
>> ( cd -- "$ziel" && tar xf - --transform=s/:/_/g )
>
> Das kopiert IMMER ALLES.
> Ich brauch inkrementeles copy.
>
Mit den entsprechenden Optionen tut es das nicht. Du
hast bisher nichts dazu geschrieben, nach welchen
Kriterien du entscheiden möchtest, ob eine Datei
(erneut) kopiert werden soll oder nicht. Deshalb
kann man dir auch keine konkreten «tar»‐Optionen
nennen, die da hilfreich wären.
Schau im «tar»‐Handbuch nach, was «tar» dir an
Optionen zur Dateiauswahl und zur Einschränkung nach
Zeitstempeln bietet. Ich werf' mal ein paar in den
Ring: «--after» «--no-recursion», «--files-from»,
«--null», «--listed-incremental».
Ansonsten kannst du auch «find» verwenden: Geh den
Quell‐Dateibaum durch: Berechne für jede Quelldatei
den Zieldateinamen gemäß der von dir festgelegten
Dateinamenumsetzung, dann finde (anhand der
Zeitstempel oder sonst wie – du hast bisher nichts
dazu geschrieben –) heraus, ob eine (erneute) Kopie
notwendig ist. Ist das der Fall, kopiere die Datei;
ansonsten geh zur nächsten weiter.
Am besten kommst du dabei vermutlich zurecht, wenn du
auf jeden Dateinamen ein Shell‐Skript, das gemäß der
gewählten Kriterien geschrieben sein muss, aufrufst:
(
cd -- "$quelle" &&
find . -type f -exec das_Skript "$ziel" '{}' \;
)
Back to de.comp.os.unix.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
rsync und vfat Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2022-09-03 14:53 +0000
Re: rsync und vfat Kay Martinen <usenet@martinen.de> - 2022-09-03 17:42 +0200
Re: rsync und vfat Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2022-09-03 18:15 +0000
Re: rsync und vfat Helmut Waitzmann <nn.throttle@xoxy.net> - 2022-09-03 17:59 +0200
Re: rsync und vfat Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2022-09-03 18:16 +0000
Re: rsync und vfat Helmut Waitzmann <nn.throttle@xoxy.net> - 2022-09-04 01:47 +0200
Re: rsync und vfat Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2022-09-04 09:18 +0000
Re: rsync und vfat Helmut Waitzmann <nn.throttle@xoxy.net> - 2022-09-04 14:34 +0200
Re: rsync und vfat Helmut Waitzmann <nn.throttle@xoxy.net> - 2022-09-04 15:03 +0200
Re: rsync und vfat Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2022-09-04 23:02 +0000
Re: rsync und vfat Helmut Waitzmann <nn.throttle@xoxy.net> - 2022-09-05 22:06 +0200
Re: rsync und vfat Tim Landscheidt <tim@tim-landscheidt.de> - 2022-09-03 16:50 +0000
Re: rsync und vfat Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2022-09-03 18:17 +0000
Re: rsync und vfat Tim Landscheidt <tim@tim-landscheidt.de> - 2022-09-03 23:21 +0000
Re: rsync und vfat Stefan Reuther <stefan.news@arcor.de> - 2022-09-04 08:36 +0200
Re: rsync und vfat Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2022-09-04 09:21 +0000
Re: rsync und vfat Stefan Reuther <stefan.news@arcor.de> - 2022-09-05 11:24 +0200
Re: rsync und vfat Marc Haber <mh+usenetspam1118@zugschl.us> - 2022-09-05 13:05 +0200
Re: rsync und vfat Tim Ritberg <tim@server.invalid> - 2022-09-03 20:33 +0200
Re: rsync und vfat Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2022-09-03 19:35 +0000
Re: rsync und vfat Tim Ritberg <tim@server.invalid> - 2022-09-04 11:08 +0200
Re: rsync und vfat Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2022-09-04 09:47 +0000
Re: rsync und vfat Tim Ritberg <tim@server.invalid> - 2022-09-04 12:07 +0200
Re: rsync und vfat Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2022-09-04 22:56 +0000
Re: rsync und vfat Tim Landscheidt <tim@tim-landscheidt.de> - 2022-09-04 13:29 +0000
Re: rsync und vfat Laurenz Trossel <me@example.invalid> - 2022-09-04 14:47 +0000
Re: rsync und vfat Arno Welzel <usenet@arnowelzel.de> - 2022-09-03 23:07 +0200
Re: rsync und vfat Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2022-09-03 21:14 +0000
Re: rsync und vfat Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2022-09-04 23:24 +0000
Re: rsync und vfat Marcel Mueller <news.5.maazl@spamgourmet.org> - 2022-09-07 11:09 +0200
Re: rsync und vfat Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2022-09-07 21:35 +0000
Re: rsync und vfat Marcel Mueller <news.5.maazl@spamgourmet.org> - 2022-09-07 10:54 +0200
Re: rsync und vfat Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2022-09-07 21:39 +0000
Re: rsync und vfat Matthias Gerds <m.gerds@posteo.de> - 2022-09-07 13:26 +0200
Re: rsync und vfat Marcel Mueller <news.5.maazl@spamgourmet.org> - 2022-09-07 15:57 +0200
csiph-web