E
E
enchikiben2012-05-13 12:12:59
linux
enchikiben, 2012-05-13 12:12:59

Deleting files in Linux with a condition?

Good afternoon! Tell the gods of the Unix command line :) is it possible to delete files from the directory with the condition that the date / time of file creation is less than for some period, say 5 minutes, the command start time.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sveolon, 2012-05-13
@Sveolon

then
find -mmin -5 -type f -delete

M
mitry, 2012-05-13
@mitry

find -mmin -5 -type f -exec rm '{}' \;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question