18

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!

Bala K
  • 299
  • 2
  • 3
  • 12

1 Answers1

41

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

tar xvf group.tar --strip-components 1
Pang
  • 9,564
  • 146
  • 81
  • 122
Vasilis Aivalis
  • 495
  • 4
  • 6