Your Question: How Do I Delete Old Files in Linux?
Contents How Do I Delete 2 Days Old Files in Linux? Explanation the First Argument Is the Path to the Files. This Can Be a Path, a Directory, or a Wildcard as...
Contents
How do I delete 2 days old files in Linux?
Explanation
- The first argument is the path to the files. This can be a path, a directory, or a wildcard as in the example above. …
- The second argument, -mtime, is used to specify the number of days old that the file is. …
- The third argument, -exec, allows you to pass in a command such as rm.
Must Read
How do I delete old files in UNIX?
If you want to delete files older than 1 day, you can try using -mtime +0 or -mtime 1 or -mmin $((60*24)) .