Comments on: How to Extract Tar Files to Specific or Different Directory in Linux https://www.tecmint.com/extract-tar-files-to-specific-or-different-directory-in-linux/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Tue, 13 Feb 2024 05:52:30 +0000 hourly 1 By: Pascal https://www.tecmint.com/extract-tar-files-to-specific-or-different-directory-in-linux/comment-page-1/#comment-1476847 Fri, 16 Apr 2021 05:12:33 +0000 http://www.tecmint.com/?p=18010#comment-1476847 Great article.

Just to note that “Example 4: Extract Only Specific or Selected Files from Tar Archive” is the wrong syntax.

The order of the arguments has to be changed. The single files or directories to be extracted need to be last:

It shall read

# tar -xvf etc.tar  -C /backup/tar_extracts/    etc/issue etc/fuse.conf etc/mysql/

reference: https://stackoverflow.com/a/9249779

]]>
By: Aaron Kili https://www.tecmint.com/extract-tar-files-to-specific-or-different-directory-in-linux/comment-page-1/#comment-1100254 Sun, 10 Feb 2019 08:59:38 +0000 http://www.tecmint.com/?p=18010#comment-1100254 In reply to SHIVANI UMEACADEMY. COM.

@SHIVANI

I would like you to know that we are pleased to have read your beautiful and kind note of appreciation and encouragement.

]]>
By: SHIVANI UMEACADEMY. COM https://www.tecmint.com/extract-tar-files-to-specific-or-different-directory-in-linux/comment-page-1/#comment-1099715 Thu, 07 Feb 2019 10:22:48 +0000 http://www.tecmint.com/?p=18010#comment-1099715 Your blog is very good, your blog has great information, your content is also very good, your blog has got a lot of help.

]]>
By: Eric https://www.tecmint.com/extract-tar-files-to-specific-or-different-directory-in-linux/comment-page-1/#comment-929980 Wed, 01 Nov 2017 15:04:01 +0000 http://www.tecmint.com/?p=18010#comment-929980 In reply to Ravi Saive.

Oh… if I change the order it works. If I move the “–directory ” earlier in the args, it works.

]]>
By: Eric https://www.tecmint.com/extract-tar-files-to-specific-or-different-directory-in-linux/comment-page-1/#comment-929977 Wed, 01 Nov 2017 15:00:55 +0000 http://www.tecmint.com/?p=18010#comment-929977 In reply to Ravi Saive.

I have the same issue as @Ren, and in my case I have created the destination dir… no matter how I specify things the extracted file always ends up in the current directory.

]]>