Task: Delete All But the Most Recent X Files in Bash
Task: Delete All But the Most Recent X Files in Bash: a task in Terminal-Lego-15k (Harbor dataset). Create a bash script that deletes all but the most recent X files from a directory. This is a common requirement for managing log files, backups, or any automatically generated files where you want…
The task
Create a bash script that deletes all but the most recent X files from a directory. This is a common requirement for managing log files, backups, or any automatically generated files where you want to keep only the N most recent versions.
Part of PrimeIntellect/Terminal-Lego-15k.