F
F
Fyodor2015-03-04 08:47:10
Task Schedulers
Fyodor, 2015-03-04 08:47:10

How to create a cron script to delete files created more than a month ago from a folder?

Actually here. I focus only on php, but I feel that such a task should be done on bash, but I’m not strong at all in it

Answer the question

In order to leave comments, you need to log in

3 answer(s)
H
hiloader, 2015-03-04
@hiloader

find /path/to/ -type f -mtime +31 -delete

S
ShamblerR, 2015-03-04
@ShamblerR

find /var/backup/etc -mtime +30 | xargs rm -f;

K
krypt3r, 2015-03-04
@krypt3r

OMG, read the mana, citizens, what is ctime, atime and is it possible in Linux to determine exactly the time the file was created

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question