LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-01-2013, 04:18 AM   #16
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: Arch + X.org + IceWM
Posts: 1,197

Rep: Reputation: Disabled

Quote:
Originally Posted by chrism01 View Post
Actually most (all?) of those tools have an option to specify how efficiently to compress (usually a range from 1 - 9, default 6), so those comparisons don't follow.
I played around with compression ratios of those algorithms. And differences within one particular algo is so minor that you can just not use it (the ratio). It won't do any noticable change. But the pick of algo will. So algo switch matters.

And if I'm not mistaken, gzip doesn't have an option for compression ratio.

Quote:
Originally Posted by chrism01 View Post
As for switches, if I can remember the correct file extension, I reckon I can remember the matching switch
I don't use tar often so I fail at remembering them. But I do always remember -a.
 
Old 03-01-2013, 06:31 AM   #17
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,261

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
http://linux.die.net/man/1/gzip
 
Old 03-01-2013, 09:33 PM   #18
Ztcoracat
Senior Member
 
Registered: Dec 2011
Distribution: Slackware & CentOS
Posts: 2,957
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
Chrism01:

Here's what my brain did with that:

Code:
What Chris said + file extention + matching switch = hope I remember which switch is correct-
LOL as that is a long 'chart of flags' on that tarball/gzip man page- -

Last edited by Ztcoracat; 03-01-2013 at 09:36 PM.
 
Old 03-02-2013, 12:10 PM   #19
rootaccess
Member
 
Registered: Mar 2012
Posts: 211

Rep: Reputation: Disabled
If you want to untar in a specific directory, like /opt

Code:
tar zxvf tarball.tgz -C /opt
 
Old 03-02-2013, 05:23 PM   #20
Ztcoracat
Senior Member
 
Registered: Dec 2011
Distribution: Slackware & CentOS
Posts: 2,957
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rootaccess View Post
If you want to untar in a specific directory, like /opt

Code:
tar zxvf tarball.tgz -C /opt
I tried that but I'm having trouble understanding.
That tarball I recently made is in my home folder/directory
What am I doing wrong?

Code:
tcoracat:~$ tar zxvf tarball.tgz -C /opt
tar (child): tarball.tgz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
ztcoracat:~$ tar zxvf tarball.tgz -C /HOME
tar (child): tarball.tgz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
ztcoracat:~$ 

I tried to cut and paste it to the /opt directory by my system did not give me that option in the drop down menu.
 
Old 03-03-2013, 09:14 PM   #21
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Debian, SL
Posts: 5,196

Rep: Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120
Hi,

are you sure it is in your home directory? The output seems to indicate it is not. Can you confirm it is there using ls?
Eg.
Code:
ls ~/tarball.tgz
Evo2.
 
Old 03-04-2013, 08:59 PM   #22
Ztcoracat
Senior Member
 
Registered: Dec 2011
Distribution: Slackware & CentOS
Posts: 2,957
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
Something is wrong-
Code:
ztcoracat:~$ ls ~/tarball.tgz
ls: cannot access /home/ztcoracat/tarball.tgz: No such file or directory
ztcoracat:~$
On my Debian system in the upper left hand corner my options are:
Application Places System

When I click on Places and then click on 'Home folder' the "tarfile.tar.gz is in a yellowish brown box that resembles a package. I see it in my directory.
Code:
ztcoracat:~$ gnome-screenshot -w
ztcoracat:~$
http://s1052.beta.photobucket.com/us...owser.png.html
 
Old 03-05-2013, 02:15 AM   #23
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Debian, SL
Posts: 5,196

Rep: Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120Reputation: 1120
Hi,

yes, the file browser does show a file called "tarfile.tar.gz":, but you are trying run tar on a different file: "tarball.tgz".

As an aside: when doing things on the command line like playing with tar, you should get into the habit of using ls instead of using a File Browser. You should also get into the habit of using "tab completion". Getting used to ls, cd, pwd and tab completion I think should be prerequisites to doing almost anything else on the command line. With these under your belt you'll make much faster progress on the command line.

Evo2.
 
Old 03-05-2013, 12:17 PM   #24
Ztcoracat
Senior Member
 
Registered: Dec 2011
Distribution: Slackware & CentOS
Posts: 2,957
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
Your right EVO- -
Those are good habits and 'prerequisites' I should be practicing.

Upon doing so I've found it most useful. Tab completion is something I need to go and look up at a few examples but I will do this on my own.

Things are clear now; thanks EVO
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to search for a pattern of a tar ball and pipe that name to tar to extract linux_newb Linux - General 2 02-27-2012 04:28 PM
Missing tar ball eliteparakeet Linux - Newbie 5 10-31-2011 11:45 AM
Help with tar ball noelc Linux - Software 6 09-26-2009 04:06 AM
tar ball locations ThisGuyIKnow Linux - Newbie 3 08-09-2006 10:48 AM
tar ball uninstall? Xris718 Linux - General 3 09-20-2004 08:55 PM


All times are GMT -5. The time now is 01:46 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration