[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: BASH - Datei suche



Robert Huckstorf schrieb:
Moin moin ...

also ich will eine beliebige datei nach einem Datum durchsuchen, das sich ständig ändert. Dieses Datum will ich dann mit date vergleichen und dann Aktionen einleiten. Dies alles möglichst mit der BASH.

Hat jemand von euch schon ähnliches realisiert ?

Mit Gruß
Robert

Hallo Robert,

sieh dir mal das find-Kommando an (man find), hier kannst du die Optionen "ctime" und  "exec" benutzen.

Gruß
; Michael

   -ctime number
        matches if the file was creation during the 24-hour period beginning
        number days ago.

   -exec command ;
        takes all arguments between -exec and the semicolon as a command line,
        replacing any argument which is exactly {} (that is, the two brace
        characters) with the current path name. It then executes the resulting
        command line, treating a return status of zero from this command as a
        successful match, non-zero as failure. You must delimit the terminal
        semicolon with white space.

begin:vcard
fn;quoted-printable:Michael M=C3=BCller
n;quoted-printable:M=C3=BCller;Michael
org:Informatik Syke
adr:;;Schilfweg 48;Syke;Niedersachsen;28857;Deutschland
email;internet:m.mueller@informatik-syke.com
title:Diplom-Informatiker
note;quoted-printable:Als Benutzer #404669 im Linux-Counter http://counter.li.org registriert..=
	=0D=0A=
	
x-mozilla-html:FALSE
url:http://www.informatik-syke.com
version:2.1
end:vcard


Reply to: