I want to create a script for unzip (.tar.gz) file via (Python)
location: linuxexchange.com - date: June 17, 2015
I am trying to make a script for unzipping all the .tar.gz files from folders in one directory. For example, I will have a file which it calls ( testing.tar.gz). Then if I do manually, I can press to "extract here" then the .tar.gz file will create a new file, and it calls testing.tar. Finally, if I repeat the process of pressing "extract here", the .tar file prodcudes me all the .pdf files.
I wonder that how can I do it, and I have my code here and it seems doesn't realty work tho.
import os
import tarfile
import zipfile
def extract_file(path, to_directory='.'):
if path.endswith('.zip'):
opener, mode = zipfile.ZipFile, 'r'
elif path.endswith('.tar.gz') or path.endswith('.tgz'):
opener, mode = tarfile.open, 'r:gz'
elif path.endswith('.tar.bz2') or path.endswith('.tbz'):
opener, mode = tarfile.open, 'r:bz2'
else:
raise ValueError, "Could not extract `%s` as no appropriate extractor is found" % path
cwd = os.getcwd()
os.chdir(t
Merge some parts of a split tar.gz file Linux command
location: linuxexchange.com - date: January 1, 1970
I have a large tar.gz file (approximately 63 GB) on a linux server. This file has about 1000 compressed csv files. I need to save the data of csv files in a database.
I can't extract whole file in one go due to limited space on the server. So I split the tar.gz file into 5 parts (4 parts of 15 GB and 1 of 3GB) but did not merge all of them as the server won't have any space left when extraction would be done. I merged the first two parts to make a new tar.gz file and extracted the csv files from that.
When I tried to merge the last 3 parts, it did not make a valid tar.gz file and that file could not be extracted. This problem was not because of server space because I deleted the files that were no longer required after extraction from first two parts.
Is there any way through which the last 3 parts of the split tar.gz file can be merged in a valid tar.gz format and then extracted?
Command used to split :
split -b 15G file.tar.gz parts
Command used to merge :
cat parts* > c
How can I unzip a tar.gz file?
location: ubuntuforums.com - date: January 22, 2010
I am trying to install code::blocks for my c++ class at school. The download file is as follows;
codeblocks_8.02-0ubuntu1.deb.tar.gz
Is there software I need to open this tar.gz file? If so, where can I get it and how can I open this file up?
.tar.gz file, unable to install. ' command not found / no such directory
location: ubuntuforums.com - date: September 27, 2010
Dear,
Finally, after the 4th attempt to register on these forums, it worked and got the activitation mail, but that wasnt much, compared to the agony before =[
So, after about 24 houres of getting used to ubuntu, I decided I wanted to install zend studio 7.1.2, downloaded the linux version (.tar.gz) for 64 bit desktops (running 64bit ubuntu). Here's when the fun started.
Since I had no clue how to install it (no double click.. then it wanted to unpack), i decided google would be a good way to go.
http://www.cyberciti.biz/faq/install-tarballs/ was the first link i found
This however, did not agree with me.
I chmodded my Desktop folder to 777 -R, just incase. Still nothing.
names of the files on desktop:
'zendstudio.tar.gz'
'ZendStudio-7.2.1-x86_64.bin'
'zendstudio.bin'
and other non-related crap.
tried to following:
Code:
~$ pwd
/home/myname
~$ cd /home/myname/Desktop
~/Desktop$ tar zxf zendstudio.tar.gz
:~/Desktop$ ./configure
bash: ./configure: No such file or director
Installation of tar.gz file in Linux
location: ubuntuforums.com - date: September 2, 2011
I am using LInux Mint 11 as Live Cd and wanted to install flash plugin from Adobe. I downloaded the file as tar.gz and as rpm and extracted it, What else should I do ? Even after extraction the site I was trying to view doesn't work and gives me the message that plugins are required. Am I doing things right?
Or do I have to go to the terminal and type out some commands? If so what should I type?
install Tar.gz file in linux Slitaz?
location: ubuntuforums.com - date: July 9, 2011
i want to install Logkeys
http://code.google.com/p/logkeys/ on Slitaz Linux. a Tar.gz file is currently in downloads. how do i do this?
how to unzip .src.tar.gz file/software
location:
linuxquestions.com - date:
February 11, 2010
I have a linux based software that ends with extension .src.tar.gz.
The installation instruction ask me to type the following command
>tar -xzf augustus.2.1.src.tar.gz
to unzip and it shows error like
[email protected]aptop:~# tar -xzf augustus.2.1.src.tar.gz
tar: augustus.2.1.src.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
I am a migrator to linux and just 2 days of experience in it. I am a microsoft windows spoonfed lazy junkie. I find it quite difficult to know what exactly this system contains.I tried linux.org tutorials and my terminal is always sending errors. I use Ubuntu netbook remix version.
Most Importantly i want to stay in LInux
[SOLVED] "Unexpected End of File" message on LXTerminal while trying to unzip a .tar.gz file
location: linuxquestions.com - date: December 22, 2012
I am trying to download pyserial-2.5.tar.gz to my Debian computer. After navigating to my desktop where I downloaded the .tar.gz file, I typed in the command gunzip pyserial-2.5.tar.gz and got an error message saying gzip: pyserial-2.5.tar.gz unexpected end of file. I'm using the LXTerminal if that helps, but when I tried to use Root Terminal the same things happen. Thanks!
when i trying to instal the file of tar.gz file in red hat linux worng?
location: linuxquestions.com - date: December 4, 2011
when i trying to intstal or extract file of tar.gz
show me an error : no file or directory
and child status
old previous version
plz can u help
i tried for tar xzvf atl2-0.2.40.0.tar.gz
How to install a tar.gz file from command line
location: ubuntuforums.com - date: January 8, 2010
I did a command-line installation.
I dont have an ethernet connection, only wireless.
For some reason the alternate installer doesnt install "wireless-tools"
How do install it?
At this point I am thinking of botting off a live USB, downloading the wireless-tolls package from here
Save it to a folder in the command line installation (where?)
then boot back into command line and install from there
But I am not that savvy with command lines, and dont know where to install to...
thoughts?
please wait...
Page: 1 2 3 4 5 6 7 8 9 10