tar

tar exclude tag

I have the following folder structure. myFolder and testFolder have same folders underneath it and I want to exclude only my1 from testFolder and not myFolder "myFolder" which has -my1 -my2 -my3 "testFolder" which has -my1 -my2 -my3 I am trying to use exclude tag along with included folders while creating a tar file. This is what ...

Why MSYS can't recognize tar-ustar option in AM_INIT_AUTOMAKE ?

Hi all! When I'm trying to run autogen from MSys 1.11 on a source, it always giving an error called, configure.ac:9: option 'tar-ustar' not recognized Can anyone please help me to get-rid of this error ? Note: andtar-v7, tar-ustar, tar-pax. all these 3 didn't work. Thank you... ...

How do i make a "system call to tar files(along with exclude tag)" to work in Perl

This is the system call, i am making right now in perl to tar the files system("${tarexe} -pcvf $tarname $includepath") which works fine. $tarexe -> location of my tar.exe file $tarname -> myMock.tar $includepath -> ./input/myMockPacketName ./input/myPacket/my2/*.wav ./input/myPacket/my3 ./input/myPacket/in.html Now i want to exclu...

Encrypt the file for security

Actually I have a file . I am working in linux environment. I need to encrypt that file for secure purpose with giving the some password. The operation could be like zip , tar any compression. When I extract the file It should ask me password , only then it should get extracted Thanks in Advance ...

How can I build a tar from stdin?

How can I pipe information into tar specifying the names of the file? ...

how to include files of particular format while tarring a folder

I have the following working tar -pcvf base.tar input/myPacket/my2 --exclude-vcs input/myPacket/my3/*.bmp When i have directories with spaces like "input file" then i include the paths in quotes and the include path doesnot work for *.bmp tar -pcvf base.tar "input file/myPacket/my2" --exclude-vcs "input file/myPacket/my3/*.bmp" Tha...

How can I fetch and extract a tgz file in a single command?

I often need to fetch tgz files, decompress them, and then delete the tgz. How can I do all three steps with one simple command? ...

How can I untar a sub directory?

Suppose I have a tar that contains: / # Root directory /level1/ # A sub directory /level1/a.file /level1/b.file /level1/... # The rest How can I do something like tar -xf that would untar the contents level1/ like this: /a.file /b.file /... # The rest ...

More efficient way to find & tar millions of files

I've got a job running on my server at the command line prompt for a two days now: find data/ -name filepattern-*2009* -exec tar uf 2009.tar {} ; It is taking forever, and then some. Yes, there are millions of files in the target directory. (Each file is a measly 8 bytes in a well hashed directory structure.) But just running... ...

Listing the content of a tar file or a directory only down to some level

I wonder how to list the content of a tar file only down to some level? I understand tar tvf mytar.tar will list all files, but sometimes I would like to only see directories down to some level. Similarly, for the command ls, how do I control the level of subdirectories that will be displayed? By default, it will only show the direct ...

Check the total content size of a tar gz file

How can I extract the size of the total uncompressed file data in a .tar.gz file? ...

Tar Error [can not open: not a directory]

I have made some archive file with the tar gnome GUI on Ubuntu but when I try to extract them tar zxvf archive_name I get following error Cannot open: Not a directory What is the problem ? ...

creating zip/rar/tar of folders in Joomla

Hi All, Please somebody help me. I want to compress a folder (which contains images & text files as well as few sub folders) in zip,rar,tar format & then give it for download to user. Is there any class/api/library/code to do so. I am working on Joomla CMS. Regards, Shahu. ...

How to extract files inside a directory from a tar file in terminal?

Hello, I want to extract only the files inside a folder of a tar file Example: Contents of tar file: /home/parent_dir/child_dir/ I want to extract only the files inside child_dir to another directory Thanks, SB ...

libarchive reads too many chars when extracting a file

I've written a C program to extract files from a tar archive using libarchive. I'd like to extract a file from this archive and print it to standard output. But I get extra characters. It's garbage, but it's from another file (possibly adjacent to it in the archive.) I expect output to end at </html>. Here is the code that reads t...

Visual Basic Edit Tar Archive

Is it possible for vb to extract files from tar(and put them back)? I found this but it says that Dim tar As New ChilkatTar <<<< ChilkatTar does not exist I am trying to edit one xml file(which is not compressed) but if i do that with notepad, the tar becomes corrupt ...

After tar extract, Changing Permissions

Just a Question Regarding unix and PHP today. What I am doing on my PHP is using the Unix system to untar a tarred file. exec("tar -xzf foo.tar.gz"); Generally everything works fine until I run into this particular foo.tar.gz, which has a file system as follows: Applications/ Library/ Systems/ After running the tar command, it seem...

Folder Renaming After Tar Extraction

I have an tarball, myarchive.tar.gz. When I uncompress it using "tar -zxvf myarchive.tar.gz", it creates a folder myarchive-x980-2303-ssioo. What's the easiest way to automatically rename the extracted folder to ensure it matches the name of the archive? I've checked tar's manpage, but it doesn't seem to have an option for this. ...

untar filename.tr.gz to directory "filename"

I would like to untar an archive e.g. "tar123.tar.gz" to directory /myunzip/tar123/" using a shell command. tar -xf tar123.tar.gz will decompress the files but in the same directory as where I'm working in. If the filename would be "tar233.tar.gz" I want it to be decompressed to /myunzip/tar233.tar.gz" so destination directory would b...

Updating a single file in a compressed tar

Given a compressed archive file such as application.tar.gz which has a folder application/x/y/z.jar among others, I'd like to be able to take my most recent version of z.jar and update/refresh the archive with it. Is there a way to do this other than something like the following? tar -xzf application.tar.gz cp ~/myupdatedfolder/z.jar a...