LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-07-2017, 12:12 PM   #1
AlexBB
Member
 
Registered: Mar 2014
Posts: 464

Rep: Reputation: Disabled
Trouble with zip files


My environment is Ubuntu 14.04, the latest one anyway, perhaps 16.04 I don't know. It is a problem that has plagued me for years. I need to download and copy a C directory with GNU license, etc that contains perhaps a hundred code files. The directory is in a tarball file .tgz or .zip. I download it all right, it ends up in Downloads directory in my laptop and I can open it up by clicking on the thumbnail and I see all the files but I cannot get into it through the terminal. If I try cd directoryName.tgz or directoryName.zip it says it is not a directory. I can rename the directory leaving the files extension out but it does not help. I really cannot move it anywhere, can copy individual files only which is a chore and I simply at a loss what to do. Please help. Thanks, - A.

P.S. The same thing is Win-10.

Last edited by AlexBB; 01-07-2017 at 12:15 PM.
 
Old 01-07-2017, 12:41 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,632

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by AlexBB View Post
My environment is Ubuntu 14.04, the latest one anyway, perhaps 16.04 I don't know. It is a problem that has plagued me for years. I need to download and copy a C directory with GNU license, etc that contains perhaps a hundred code files. The directory is in a tarball file .tgz or .zip. I download it all right, it ends up in Downloads directory in my laptop and I can open it up by clicking on the thumbnail and I see all the files but I cannot get into it through the terminal. If I try cd directoryName.tgz or directoryName.zip it says it is not a directory. I can rename the directory leaving the files extension out but it does not help. I really cannot move it anywhere, can copy individual files only which is a chore and I simply at a loss what to do. Please help. Thanks, - A.

P.S. The same thing is Win-10.
Seriously??? YEARS on this?

A .tgz or .zip file is A FILE...not a directory. Until you UNzip it, you can't do anything with it. The file manager will let you view the contents, but only VIEW...to modify/change, you have to extract. And if you're in the file manager, why can't you select multiple files???

Did you try running "unzip <name of zip file>", or "tar xvfz <name of .tgz/tar.gz file>", and see what it does???? Very first hit in Google for "how to unzip a file in linux" is:
http://askubuntu.com/questions/86849...m-the-terminal

Last edited by TB0ne; 01-07-2017 at 12:42 PM.
 
2 members found this post helpful.
Old 01-07-2017, 01:37 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,691

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
As stated the file browser creates a virtual directory when you click on the tar/zip file where you can view the directories/files inside and extract one or everything as desired. This allows you to view the contents without actually extracting them which can be very convenient. If you want to use the termnal to access the contents then you have to really extract them either by the browser or tar/unzip command.

Last edited by michaelk; 01-07-2017 at 02:38 PM.
 
1 members found this post helpful.
Old 01-07-2017, 02:35 PM   #4
AlexBB
Member
 
Registered: Mar 2014
Posts: 464

Original Poster
Rep: Reputation: Disabled
Thank you very much. Unzip worked. very simple. Stupid me. - Alex
 
  


Reply



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
Linux zip program's -d -tt option deletes all files from zip archive Arun Gupta Linux - Software 4 04-27-2011 07:06 PM
How to zip several files to several zip with one command? thomas2004ch Linux - Newbie 4 02-08-2010 08:13 AM
ZIP Drive trouble?? ashishuttarwar Linux - Hardware 4 06-24-2004 01:01 AM
Trouble mounting Zip 100.... cbjhawks Linux - Hardware 3 02-02-2004 02:55 PM
trouble installing Info-Zip r_b Linux - Software 0 02-08-2002 09:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:24 AM.

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