LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   archiving a huge Mail Dir (https://www.linuxquestions.org/questions/linux-newbie-8/archiving-a-huge-mail-dir-4175549327/)

basem 07-30-2015 01:39 AM

archiving a huge Mail Dir
 
Hi guys,

I have a MailDir with 650 GB, I need to split and archive it using tar, sorting by month.

when I use something like ls -alh to list the contents historically to verify date, it takes so long time,

could you please advise me how to deal with the Dir efficiently in this case efficiently..

thanks

Keruskerfuerst 07-30-2015 01:41 AM

Hardwareinfo?

descendant_command 07-30-2015 01:54 AM

Probably 'find' with appropriate -mtime values piped to your tar command.
Whatever you use is going to take ages as each file will need to be 'stat'ed to get the date.
Probably you have far too many files for 'sort'ing to a list to be usable..

Like asking for a quick way to sort 650 tonnes of assorted coloured marbles into a bin for each of the 1000 colours ... there isn't one.


All times are GMT -5. The time now is 08:08 PM.