Can GNU tar add many files to an archive, deleting each one as it is added?
This is useful when there is not enough disk space to hold both the entire tar archive and th
I had a task - archive files and then remove into OS installed "tar" without GNU-options.
Use "xargs"
Suppose, we are have a directory with files.
Need move all files, over the week into tar and remove it.
I do one archive (arc.tar) and added files to it. (You can create new archive every try)
find ./ -mtime +7 | xargs -I % sh -c 'tar -rf arc.tar % ; rm -f %'