[Schan-user] Schülerdateien löschen

Heiner Köster listenfach at hans-wuertz-schule.de
Mit Aug 29 13:22:41 CEST 2012


Am 29.08.2012 08:55, schrieb Helmut Hullen:
> Hallo, Heiner,
>
> Du meintest am 29.08.12:
>
>> unten hänge ich das Skript an, mit dem ich Schülerdateien löschen
>> möchte. Allerdings soll nun nur noch in Ordnern gesucht werden, die
>> mit "home/Klasse/Klasse" beginnen. Reicht es, wenn ich den Pfad unten
>> von "/home/Klasse" auf "/home/Klasse/Klasse*" ändere?
>
> Ja - reicht.

Hallo Helmut,

Danke. In der Syntx des Skript sieht es ein wenig anders aus. Unten 
hänge ich die Zeilen noch einmal an, nach Datei-Endungen sortiert - 
erleichtert den Überblick, welche Dateien von der Löschung bereits 
erfasst sind.

Gruß

Heiner

===== schnipp

> #! /bin/sh
> # Zum Einsatz nach den Sommerferien
> # löscht Dateien mit bestimmten Endungen in /home/Klasse/Klasse*
> # also nur Schülerdateien; Verzeichnisse bleiben erhalten
> # Koester 29.8.2006, ergänzt von Helmut Hullen 29.8.2012
>
> # Temporäre Dateien löschen
> find /home/Klasse/Klasse* -name "*.wbk" -print0|xargs -0 /bin/rm
> find /home/Klasse/Klasse* -name "*.tmp" -print0|xargs -0 /bin/rm
> find /home/Klasse/Klasse* -name "*.bak" -print0|xargs -0 /bin/rm
> find /home/Klasse/Klasse* -name "*.sik" -print0|xargs -0 /bin/rm
> find /home/Klasse/Klasse* -name "backup*.*" -print0|xargs -0 /bin/rm
> find /home/Klasse/Klasse* -name "~*.doc" -print0|xargs -0 /bin/rm
> find /home/Klasse/Klasse* -name "*~*.doc*" -print0|xargs -0 /bin/rm
> #
> find /home/Klasse/Klasse* | grep "\.arr$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.ASF$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.asf$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.AVI$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.avi$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.BMP$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.bmp$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.css$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.DB$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.db$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.DOC$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.doc$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.DOT$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.dot$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.EXE$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.exe$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.flv$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.FTW$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.ftw$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.GIF$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.gif$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.HTM$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.htm$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.INI$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.ini$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.JPG$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.jpg$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.JPEG$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.jpeg$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.js$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.LNK$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.lnk$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.LOG$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.log$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.MP3$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.mp3$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.Mp3$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.MP4$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.mp4$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.MPG$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.mpg$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.ODB$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.odb$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.ODG$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.odg$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.ODP$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.odp$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.ODT$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.odt$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.PCX$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.pcx$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.PDF$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.pdf$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.PNG$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.png$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.PPT$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.ppt$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.RAR$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.rar$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.RDF$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.rdf$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.RTF$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.rtf$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.SVG$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.svg$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.sxw$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.sxd$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.TIF$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.tif$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.TXT$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.txt$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.URL$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.url$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.WAV$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.wav$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.WMA$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.wma$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.WMF$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.wmf$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.WMV$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.wmv$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.WPL$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.wpl$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.XCF$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.xcf$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.XML$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.xml$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.ZIP$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done
> find /home/Klasse/Klasse* | grep "\.zip$" | while read line ; do if [ -f "${line}" ] ; then rm "${line}" ; fi ; done

-- 
Hans-Würtz-Schule
Förderschule mit dem Schwerpunkt
Körperliche und Motorische Entwicklung
Kruppstraße 24a
38126 Braunschweig
Tel.: 0531/680 370
Fax: 0531/6 80 37 19
http://www.hans-wuertz-schule.de

_______________________________________________
schan-user mailing list
schan-user at listserv.heise.de
http://www.heise.de/bin/newsletter/listinfo/schan-user