Answer the question
In order to leave comments, you need to log in
How can I archive and delete?
Good afternoon, there are 50,000 ~2MB files,
how can I create an archive and delete it right away, i.e. put it in the archive and immediately deleted the file, switched to the second file, etc.
Now I do this:
find . -mmin -3600 -type f | xargs tar -acvf bkp.tar.gz
find . -mmin -3600 -type f -delete
Answer the question
In order to leave comments, you need to log in
I wouldn't do that if I were you. If something happens, you will be left with a broken archive and without half of the files.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question