Wilders Security Forums  

Go Back   Wilders Security Forums > Software, Hardware and General Services > all things UNIX
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread
  #1  
Old April 7th, 2012, 11:32 AM
Ocky's Avatar
Ocky Ocky is offline
Very Frequent Poster
 
Join Date: May 2006
Location: George, S.Africa
Posts: 2,538
Default Untar to a specific directory

How do you usually untar ? Say you saved a tar.gz to Desktop and now want to untar it to
another directory, what is your usual method and do you use the command line ?

I know how with the command line but it's a bit cumbersome.

( I think most folks simply r/click extract and then proceed to move the extracted folder to where they want it).
__________________
Ubuntu Kubuntu Xubuntu Scientific Linux
  #2  
Old April 7th, 2012, 12:11 PM
vasa1's Avatar
vasa1 vasa1 is offline
Massive Poster
 
Join Date: May 2010
Posts: 3,989
Default Re: Untar to a specific directory

Quote:
Originally Posted by Ocky
...
( I think most folks simply r/click extract and then proceed to move the extracted folder to where they want it).
That's what I do. Why the question? What are you thinking about?
__________________
One can't be too rich, too thin, or too secure
  #3  
Old April 7th, 2012, 12:33 PM
Ocky's Avatar
Ocky Ocky is offline
Very Frequent Poster
 
Join Date: May 2006
Location: George, S.Africa
Posts: 2,538
Default Re: Untar to a specific directory

Quote:
Originally Posted by vasa1
That's what I do. Why the question? What are you thinking about?
Just wondering who bothers with the command line for this. Surely we are both striving to become avid cli users ?
Eg. [ocky@localhost General Help]$ tar -C /home/ocky/Desktop -xvzf "/home/ocky/Documents/General Help/rkhunter.tar.gz"
rkhunter/
rkhunter/rkhunter SL6 warnings
rkhunter/README.txt
rkhunter/Lucid rkhunter warnings
rkhunter/rkhunter warnings recd.txt
rkhunter/rkhunter script.mht
rkhunter/rkhunter_scan.sh
rkhunter/rkhunter.mht
rkhunter/rkhunter
[ocky@localhost General Help]$

(for extracting rkhunter.tar.gz to Desktop)

I didn't know this until recently i.e. was always stumped when trying to do it via the command line and thus noob depression set in.
__________________
Ubuntu Kubuntu Xubuntu Scientific Linux
  #4  
Old April 8th, 2012, 08:30 AM
Mrkvonic Mrkvonic is offline
Linux Systems Expert
 
Join Date: May 2005
Posts: 7,467
Default Re: Untar to a specific directory

tar zxvf <archive> -C <dir>

I find this much more intuitive than the GUI.
For gz, use xzvf.
For bz2, use -xjvf.

-v is optional.

Cheers,
Mrk
__________________
http://www.dedoimedo.com

All your base are belong to us

Linux Systems Expert / Systems Programmer, Linux System Administrator, LPIC-1, LPIC-2 (WIP), GSEC, CCHD, CCHA
  #5  
Old April 8th, 2012, 11:22 AM
Ocky's Avatar
Ocky Ocky is offline
Very Frequent Poster
 
Join Date: May 2006
Location: George, S.Africa
Posts: 2,538
Default Re: Untar to a specific directory

Quote:
Originally Posted by Mrkvonic
tar zxvf <archive> -C <dir>

I find this much more intuitive than the GUI.
For gz, use xzvf.
For bz2, use -xjvf.

-v is optional.

Cheers,
Mrk
OK, thanks.
~ Removed Off Topic Comments ~
__________________
Ubuntu Kubuntu Xubuntu Scientific Linux

Last edited by JRViejo : April 8th, 2012 at 11:26 PM. Reason: Off Topic Remarks Removed - JRViejo
  #6  
Old April 8th, 2012, 09:21 PM
BrandiCandi
 
Posts: n/a
Default Re: Untar to a specific directory

Quote:
Originally Posted by Mrkvonic
tar zxvf <archive> -C <dir>

I find this much more intuitive than the GUI.
For gz, use xzvf.
For bz2, use -xjvf.

-v is optional.

Cheers,
Mrk
Very useful to know- thanks!
  #7  
Old April 8th, 2012, 11:26 PM
JRViejo's Avatar
JRViejo JRViejo is offline
Global Moderator
 
Join Date: Jul 2008
Posts: 10,597
Default Re: Untar to a specific directory

Removed Off Topic Post.
__________________
JR
"You don't have to win every argument. Agree to disagree." Regina Brett
  #8  
Old April 9th, 2012, 07:40 AM
NGRhodes's Avatar
NGRhodes NGRhodes is offline
Very Frequent Poster
 
Join Date: Jun 2003
Location: West Yorkshire, UK
Posts: 1,918
Default Re: Untar to a specific directory

Open archive with fileroller (rather than right click/extract) and the use extract option which brings a dialog, part of which allows you choose a destination folder.

If I happen to be in the command line I will extract my tarball from there.
  #9  
Old April 9th, 2012, 11:23 AM
mack_guy911's Avatar
mack_guy911 mack_guy911 is offline
Very Frequent Poster
 
Join Date: Mar 2007
Posts: 2,499
Default Re: Untar to a specific directory

Quote:
Originally Posted by Mrkvonic
tar zxvf <archive> -C <dir>

I find this much more intuitive than the GUI.
For gz, use xzvf.
For bz2, use -xjvf.

-v is optional.

Cheers,
Mrk


great stuff

http://www.computerhope.com/unix/utar.htm

http://www.thegeekstuff.com/2010/04/...mand-examples/
__________________
Scientific Linux 6.2, xubuntu 11.10 *2x, Linux mint 10, Linux mint 12, opensuse 11.4, windows vista, ubuntu 10.04 and windows xp
  #10  
Old April 11th, 2012, 07:26 AM
Beavenburt Beavenburt is offline
Frequent Poster
 
Join Date: Dec 2006
Posts: 566
Default Re: Untar to a specific directory

Despite some linux nerds protestations there are particular functions that are more quickly carried out in gui rather than the command line. IMO extracting archives is one of them. Therefore I right click and "extract to"
 

Wilders Security Forums > Software, Hardware and General Services > all things UNIX « Previous Thread | Next Thread »

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 08:08 PM.


Powered by vBulletin® Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2013, Wilders Security Forums