User Tools

Site Tools


ubuntu:email:archive_old_emails

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
ubuntu:email:archive_old_emails [2019/11/27 21:46] – created peterubuntu:email:archive_old_emails [2020/12/06 11:40] (current) peter
Line 4: Line 4:
  
 <code bash> <code bash>
-(CD current/ && find . -mtime +732 -print0) | rsync -ag –remove-source-files –files-from=- –from0 ./current_maildirs_location/ ./archive_maildirs_location/+(cd current/ && find . -mtime +732 -print0) | rsync -ag –remove-source-files –files-from=- –from0 ./current_maildirs_location/ ./archive_maildirs_location/
 </code> </code>
  
  
 This will recursively go through all directories in the current_maildirs_location, find files older than 2 years and move them into the  archive_maildirs_location, preserving the directory structures. This will recursively go through all directories in the current_maildirs_location, find files older than 2 years and move them into the  archive_maildirs_location, preserving the directory structures.
ubuntu/email/archive_old_emails.1574891202.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki