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

I've got a bad backup script including an unwanted file. The .tar.gz backup file is 5gig big and I'd like to get a list of every file in the archive and their size.

Is that possible ? How would you do it ?

share|improve this question
up vote 10 down vote accepted

This should list all files and detailed information about them:

tar -ztvf somefile.tar.gz
share|improve this answer


tar --list --verbose --gunzip --file backup.tar.gz > backup_list.txt

to create a file containing a list of all the files in your archive.

You can then grep foo backup_list.txt to find things, or edit, sed, cut, view, etc.

share|improve this answer

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.