Extract tar file without creating folder

Bala K picture Bala K · May 15, 2015 · Viewed 10.4k times · Source

I want to extract tar file in Unix tar xvf /home/test/group.tar and once extracted got a folder group which has list of xls,pdf,txt files.

How can i extract contents of group.tar inside /home/test/list of xls, pdf files without creating group folder.

Any specific command available or have to follow with copy and move??

Thanks!

Answer

Vasilis Aivalis picture Vasilis Aivalis · May 15, 2015

You may use the --strip-components 1 parameter.

tar xvf group.tar --strip-components 1