Command to move files to Ubuntu trash for files older than:
find . -type f -name '*.txt' -mtime +7 -exec gio trash {} \;
Where:
find .
: search current folder-type f
: limit search to files-name '*.txt*'
: limit search to files that have.txt
extension-mtime +7
: last modification date is >= 7 days-exec gio trash {} \;
: move matching elements to Ubuntu trash
Note: {} represents the elements and ; closes the command