You can try as follows: find . -ctime -365 | xargs rm Explaining the above command, find is to search for files and directories in Linux. indicates the directory you are in (don’t do this within a directory you don’t want to delete the files) -ctime searches for files by the date of creation, -365 indicates the time you are looking for, | xargs this command picks up the output of the find command and applies the other action requested in case rm.
https://unix.stackexchange.com/questions/302011/finding-and-deleting-files-with-a-specific-date
– user60252
You can try as follows: find . -ctime -365 | xargs rm Explaining the above command, find is to search for files and directories in Linux. indicates the directory you are in (don’t do this within a directory you don’t want to delete the files) -ctime searches for files by the date of creation, -365 indicates the time you are looking for, | xargs this command picks up the output of the find command and applies the other action requested in case rm.
– Samuel Fagundes de Oliveira