Rekursiv Files eines bestimmten typs in Ordner kopieren

Aus Primatenwiki
Zur Navigation springen Zur Suche springen

Syntax:

find <path> <condition> -exec cp '{}' <copy path> \;

Beispiel für Kopieren von Files welche weniger als einen Tag alt sind nach inner/:

find -mtime -1 -type f -exec cp '{}' inner/ \;

Beispiel für Kopieren von Files welche die Endung .jpg haben nach images/:

find . -type f *.jpg -exec cp '{}' images/ \;