Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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

1 Answer 1

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.