Trovare file creati prima di n giorni

Per trovare tutti i file creati prima di un certo numero di giorni usare il comando:

find . -type f -ctime <n giorni> -ls

More than 30 days ago: -ctime +30

Less than 30 days ago: -ctime -30

Exactly 30 days ago: -ctime 30

Nota dalla pagina man di find:

“n*24 hours ago. When find figures out how many 24-hour periods ago the file was last accessed, any fractional part is ignored, so to match -atime +1, a file has to have been accessed at least
two days ago”

Comments

Leave a Reply

Your email address will not be published.