+2 votes
in Operating Systems by (60.0k points)

I want to write a cron job to delete all files in the /tmp folder that have not been accessed in 3 days. What Linux command should I use to find such files?

1 Answer

+1 vote
by (354k points)
selected by
 
Best answer

You can use the find command with atime.

Here is an example:

# find /tmp -atime +3


...