How Do I Delete a File Before a Certain Date in Linux?
Contents How Do I Delete Files Older Than a Certain Date? as Before, the -Mtime Parameter Is Used to Find Files Older Than X. in This Case, It’s Older Than 180...
Contents
How do I delete files older than a certain date?
As before, the -mtime parameter is used to find files older than X. In this case, it’s older than 180 days. You can either use the -delete parameter to immediately let find delete the files, or you can let any arbitrary command be executed ( -exec ) on the found files.
How do I delete a specific file in Linux?
Type the rm command, a space, and then the name of the file you want to delete. If the file is not in the current working directory, provide a path to the file’s location. You can pass more than one filename to rm . Doing so deletes all of the specified files.