Get Rid of Old IFS Files, Take Two
December 6, 2002 Timothy Prickett Morgan
Hey, Ted:
I have worked with Unix for 18 years. Here is a Qshell command that will remove any file that is more than seven-days old. (It also checks subdirectories).
Here is the command:
find * -type f -mtime +7 -exec rm {} ;
— Mike
|
I am grateful to Mike for providing that tip.
Now, let’s break that command down so we can understand it.
The find command locates files that match certain criteria. In this case, find looks for files that have not been modified in the last seven days.
The find command may be followed by options.