Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[DUP] Löschen von Dateien nach Alter
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
bll0
Apprentice
Apprentice


Joined: 22 May 2004
Posts: 178

PostPosted: Fri Oct 07, 2005 9:49 pm    Post subject: [DUP] Löschen von Dateien nach Alter Reply with quote

Hi!

Ich hab da ein kleines Script was mir per cronjob nen tarball von einem Verzeichnis macht.
Nun möchte ich gerne die tarballs die älter sind als 1 Monat vorher (oder nachher) löschen.

Also meine Frage: Wie finde ich mit nem bash-script heraus ob eine Datei älter als 1 Monat ist?

Danke und schönen Abend noch!

Christian
_________________
I need a girl whose name doesn't end in .jpg
Back to top
View user's profile Send private message
moe
Veteran
Veteran


Joined: 28 Mar 2003
Posts: 1289
Location: Potsdam / Germany

PostPosted: Fri Oct 07, 2005 10:39 pm    Post subject: Reply with quote

Code:
find /pfad -ctime +X | xargs rm

X ist Anzahl der Tage

Gruss Maurice
Back to top
View user's profile Send private message
amne
Bodhisattva
Bodhisattva


Joined: 17 Nov 2002
Posts: 6378
Location: Graz / EU

PostPosted: Sat Oct 08, 2005 9:06 am    Post subject: Reply with quote

Als Duplikat von Tool um Dateien zu löschen die älter sind als .... geschlossen, siehe dort.
_________________
Dinosaur week! (Ok, this thread is so last week)
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum