Delete Files Older Than One year, older than one month,older than six month,older than 7days on Linux
We can do it using this command find /path/to/files* -mtime +365 -exec rm {} \; How it works.. /path/to/files* is the path to the files to be deleted. -mtime is used to specify the number of days old that the file is. +365 will find files older than 365 days which is one year. -exec … Continue reading →
Filed under linux, operating system, Technology · Tagged with delete 7 days old files in linux, delete older files, delete one year old file in linux, delete six month old file in linux