-3
votes
3answers
2k views

How to find files of certain extension and tar each of them in to another location

I have script for finding files of certain type and compress them to a single tar archive and put in to other place. But now, there is a change in requirement, that I need to find files of certain ...
2
votes
1answer
2k views

tar Exiting with failure…?

i'm untaring with this command tar -pxvzf filename.tar.gz an everything seems to be going fine but, it unexpectedly exits with the error below. Is there a reason why I'm receive this error and / or ...
1
vote
2answers
449 views

How to untar a single file from an archive with randomly generated directory names?

I'm trying write a script that will download a tarball from github and extract a single file from it. However the top level directory inside the tarball has some random characters in it, which I ...
3
votes
2answers
321 views

How to tarball a directory without carrying over /path/to/folder?

Example command: $ tar -cvjf destination.tar.bz2 /path/to/folder/source I'd like the final destination.tar.bz2, when extracted, to not include a /path/to/folder/ file directory. It seems inefficient ...
0
votes
1answer
411 views

Correct way of using the --remove-files option with TAR

What is the correct way to use the --remove-files option when using tar? Is it... tar -cfvj --remove-files archive.tar.bz2 archive/ Or... tar -cfvj archive.tar.bz2 archive/ --remove-files
2
votes
1answer
204 views

Tar “mode” flag is being ignored

I try to tar a file and set the permissions to 666 using the mode flag. But whatever permission I set, it is simply being ignored. Command: tar xvzf backup.tar.gz --mode=666 -C /home/user/ Till ...
1
vote
1answer
1k views

Create ZIP archive without storing permissions?

I am distributing packaged files in ZIP format. I use the following to create: zip -r distr.zip files/ When expanded on other UNIX system files preserve their permissions as they were when I packed ...
2
votes
3answers
5k views

tar a directory and only include certain file types

Following the instructions here: http://linuxdevcenter.com/pub/a/linux/lpt/20_08.html I'm aiming to tar up a directory but only want to include .php files from that directory. Given the ...