Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Pretty much in the title. I have a box with very little disk space left and lots of data. I want to add all of the files into a tar, deleting them as I go because there is clearly not enough space to get it all in without deleting the data. So, using the tar --remove-files option should work, if it deletes after it adds each file, not deleting after it completes the entire archive.

It's not sensitive data, just movies and music so I decided to run it anyway, so I'll find out in a while, but if anyone knows, it will certainly set my mind at ease if they could answer. If not, I'll post my findings once it's completed or failed miserably.

share|improve this question
Since you have it running now, you can just monitor disk space or ls some files to see if they're still there. – Stefan Seidel Sep 17 '12 at 11:35

I'm having a similar problem so I tried doing strace on tar remove-files acting on 2 files. In this case it seems like unlink is called by the system in the end, so that would mean that tar is first archiving and then deleting. This is of course not a conclusive test, but at least a hint. You could try the same thing but with more files and look if tar acts differently in that case.

share|improve this answer
this is not an answer. – Francisco Tapia Jul 31 '15 at 13:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.