Michael Kastner sagte:
> wei� jemand wie ich rekursiv einen Verzeichnisbaum durchsuchen und
> bestimmte Verzeichnisse l�schen kann?
>
> Ich w�rde z.B. gerne ein Backup von meinem CVS-Arbeitsverzeichnis
> machen, aber ohne die CVS-Verzeichnisse. Und da mein Verzeichnisbaum
> ziemlich tief ist, w�re es ziemlich dr�ge das manuelle zu machen.
rsync hat eine Option "--cvs-exclude", vielleicht kannst Du ja Deine
Backups mit rsync machen, ohne was l�schen zu m�ssen. Oder vielleicht
kennen irgendwelche GNU-tar,pax,cpio's eine �hnliche Option.
-C, --cvs-exclude
This is a useful shorthand for excluding a broad
range of files that you often don�t want to trans�
fer between systems. It uses the same algorithm
that CVS uses to determine if a file should be
ignored.
The exclude list is initialized to:
RCS SCCS CVS CVS.adm RCSLOG cvslog.* tags TAGS
.make.state .nse_depinfo *~ #* .#* ,* *.old *.bak
*.BAK *.orig *.rej .del-* *.a *.o *.obj *.so *.Z
*.elc *.ln core
then files listed in a $HOME/.cvsignore are added
to the list and any files listed in the CVSIGNORE
environment variable (space delimited).
Finally, any file is ignored if it is in the same
directory as a .cvsignore file and matches one of
the patterns listed therein. See the cvs(1) manual
for more information.
> Was nicht geht, wei� ich schon. N�mlich das:
>
> rm CVS -fr
>
> Hat jemand eine Idee?
OHNE GEW�HR F�R ALLES:
find /foo/bar -type d -name "CVS" -print | xargs rm -Rf
Kann man denn diese Dateien einfach so l�schen? Ich arbeite mit RCS, und
wenn ich da vor der Datensicherung das Verzeichnis "RCS" l�schen w�rde,
k�nnte ich auf die Revisionskontrolle eigentlich gleich ganz verzichten.
Ciao,
-martin
--
Schmitt Systemberatung
Giessener Str. 18
35415 Pohlheim
Deutschland/Germany
Tel. +49(64 03)9 69 08 78
Fax +49(64 03)9 69 08 79
http://www.scsy.de
----------------------------------------------------------------------------
PUG - Penguin User Group Wiesbaden - http://www.pug.org