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!
Simply right-click the item you want to compress, mouseover compress, and choose tar. gz. You can also right-click a tar. gz file, mouseover extract, and select an option to unpack the archive.
A. GNU tar can be used to extract a single or more files from a tarball. To extract specific archive members, give their exact member names as arguments, as printed by -t option.
Use -t switch with tar command to list content of a archive. tar file without actually extracting. You can see that output is pretty similar to the result of ls -l command.
You may use the --strip-components 1
parameter.
tar xvf group.tar --strip-components 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With