How to find and delete older files (older than 7 days) in a folder using a bash script? It's a folder in a server which contain automatic backups. Need to delete old ones automatically so there's space for new ones.
Tell me more
×
Ask Ubuntu is a question and answer site for
Ubuntu users and developers. It's 100% free, no registration required.
name the script as some_file_name.sh and give execute permissions.
Run it as |
|||
|
|
|
Using the below command, first confirm the file list:
If the list is correct, using below the files can be deleted.
|
|||
|
|