D
D
DROS2018-11-07 14:06:23
ubuntu
DROS, 2018-11-07 14:06:23

How to archive a folder with files created within a certain period?

There is a folder with several hundred thousand files and subdirectories. It is necessary to archive (preserving the folder structure) files for a certain time interval (say, from 1 to 30/31 of a month and year). All of this is on Ubuntu.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pfg21, 2018-11-07
@DROS

find /path/to -mtime +50 -mtime -100 | tar -cjf archive.tar.bz2 -T -
find files modified between 50 and 100 days ago.
transfer the list of files to a container for packing files into an archive
somehow

S
Sergey, 2018-11-07
@feanor7

I don’t even remember beautiful solutions for sampling, read about sampling, then zip and pipeline
https://www.opennet.ru/tips/info/2055.shtml

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question