Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The easy way is to use the find command with the -mtime option

find /opt/GeneWeb/bases/BACKUPS/ -name '*Behne.gwb.tar.gz' -mtime +6 -exec ls -dl {} +

When you are satisfied that this produces a list of files you really want to delete, the run this:

find /opt/GeneWeb/bases/BACKUPS/ -name '*Behne.gwb.tar.gz' -mtime +6 -exec rm {} +

The -mtime +6 option select files modified more that 6 days ago, that is 7 or more days.