LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-26-2018, 11:02 AM   #1
kamtarias
LQ Newbie
 
Registered: May 2018
Posts: 3

Rep: Reputation: Disabled
Extract Specific file from TarBall


Hi Team,

I have a Tar Ball xyz.tar and there is many files inside it like xyz1, xyz2.. xyz10. Now I want to extract file xyz2 to specific Directory. How can I do it ??
 
Old 08-26-2018, 11:07 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by kamtarias View Post
Hi Team,
I have a Tar Ball xyz.tar and there is many files inside it like xyz1, xyz2.. xyz10. Now I want to extract file xyz2 to specific Directory. How can I do it ??
Start by reading the man page on the tar command, as well as the "Question Guidelines" link in my posting signature. You need to do basic research first before posting.

Did you try the "tar -xf <filename>.tar <filename-you-want>" command???
 
Old 08-26-2018, 04:08 PM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
could use a favorite tar ball GUI app and have it show you the files in it, then select the files you want and select extract selected file, or something along that line. (follow prompts).
 
Old 08-26-2018, 06:22 PM   #4
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,808
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Basic functionality of a competent OFM, e.g. mc, which most distros have available in standard repos, if not installed by default. Simply "enter" the archive file the same way you would enter any directory, select the files to act upon, select the target location, hit F5.
 
1 members found this post helpful.
Old 08-28-2018, 05:47 AM   #5
gszumo
LQ Newbie
 
Registered: Aug 2008
Location: New Jersey
Distribution: Slackware & Crunchbang
Posts: 5

Rep: Reputation: 2
Extract Specific file from TarBall

If you change directory to the target first then you can pass the desired file as a parameter to tar to extract it, i.e.,

$ cd destination
$ tar xvf /path/to/xyz.tar xyz2

Hope this helps.
 
1 members found this post helpful.
Old 12-14-2018, 09:25 AM   #6
cesarbergara
Member
 
Registered: Feb 2012
Location: Buenos Aires, Argentina
Distribution: Debian, Suse, Mandrake,
Posts: 92

Rep: Reputation: Disabled
Hi. Midnight Commander (mc) is a great and powerful tool. ĦBut is really dangerours too! If you don't use command line all the time, you must don't use mc, because is feel like graphic tool but is powerful like command lines files.
Have a nice day.
 
Old 12-14-2018, 09:55 AM   #7
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by gszumo View Post
If you change directory to the target first then you can pass the desired file as a parameter to tar to extract it, i.e.,

$ cd destination
$ tar xvf /path/to/xyz.tar xyz2

Hope this helps.
You can also add to above "-C /target/directory" option and specify where to extract...
 
Old 12-15-2018, 02:32 AM   #8
KIOPRET
LQ Newbie
 
Registered: Nov 2018
Posts: 20

Rep: Reputation: 1
You may start by googling the basic commands for the program, then the program becomes really easy to operate! Good luck solving your issue!
 
1 members found this post helpful.
Old 12-15-2018, 09:18 AM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by KIOPRET View Post
You may start by googling the basic commands for the program, then the program becomes really easy to operate! Good luck solving your issue!
...which is exactly what the OP was told by others before. You've made many posts recently that really only echo what others have said, or have little context to the actual thread they're posted in.
 
  


Reply

Tags
tarball



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract only specific part from a file babyPen Linux - Newbie 3 03-24-2015 02:12 AM
Shell Script To Extract Specific Information From File immolation Programming 6 06-13-2013 12:27 PM
extract specific content from file vaibhavs17 Linux - General 9 08-24-2011 02:41 PM
Extract specific directory / file from tar ust Linux - Newbie 3 09-11-2008 01:15 AM
How to extract specific directory from a TAR file? Micro420 Linux - General 4 04-18-2007 12:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration