I\'m trying to remove all the dateed logs except the most recent. Before I execute a script to remove the files, I want to of course test my commands to make sure I\'m bring
You can use the find command with mtime.
For example:
find /path of the folder -type f -mtime +30
-type refers to file type.
-type
+30 refers to the date before the present date.
+30
For more options we can refer to the man page.