Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

Given that I have this archive my_archive.tar.gz which has this file in it: README. How can I output the content of README without having to extract the archive?

OS: Debian 7

share|improve this question
up vote 6 down vote accepted

Use z to (g)unzip, x to extract, with f from archive file. Then add also option -O to direct extracted files to standard output.

tar xzf my_archive.tar.gz folder/README.txt -O


share|improve this answer
Thank you very much! – Dragos Rizescu Jan 13 '14 at 15:59

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.