|
I am looking for a Unix command which will create a tar of 10 files from a directory.
Started by Ritesh Sharma on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
You can check out the tar....
File10
That'll do it.
$ tar cf tenfiles.tar file1 file2 file3 ...
Well, depending on your needs...
The command you're looking for is: tar
How it's usually used:
$ tar cf file.tar file1 file2...
|
|
I would like to use tar command in linux
and i would like to exclude specific directory
how can i do that ?
Started by haim evgi on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at serverfault):
You can also.
tar -cf backup.tar /directory --exclude "IGNORE-ME"
If it wasn't snowing out, i'd probably point out that man tar is as good as RTFM (and google 'tar exclude file' is even faster).
IGNORE-ME.
|
|
As the title says - anyone know of a method to add tar/gzip to the command line in Windows? I've installed Cygwin - but don't know if I have to add something to the PATH env variable to get tar as a cmd option
Started by sunwukung on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The method I've used to solve this is to install Cygwin then place the path to the bin directory in the PATH variable... .
Install UnxUtils - it's a set of GNU utilities ported to Windows, sort of like Cygwin but they also work outside the Cygwin environment .
|
Ask your Facebook Friends
|
Hi,
We have several files larger than 2GB tared using tar command UNIX version (SunOS 5.5 with last change: 1995!). There is "E" flag to tar files > 2GB. This is how it was been done:
rsh sun_server tar cvEf - abc/file1 abc/file2 | rsh archive_server...
Started by Saleh Al-Zaid on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at serverfault):
A thought, you could use the command split to break up the tar archive into several pieces....For example, consider something like:
tar cf - <dirspec> | split --bytes=1GB <destdir>/archive the thing at any time on the....
|
|
Hi,
How do I tar a list of files and folders (all in the same directory) with the exclusion of a single directory (which contains a huge amount of data)
Started by Ed Bloom on
, 5 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
But ....
You can use 'man tar' or 'tar --help' to check for details on your version.
I think it may depend on your version of tar.
GNU tar.
tar --exclude=PATTERN xvzf nameof.tar.gz ./*
PATTERN can be the directory name.
|
|
Scenario: I have a directory on a server that hosts my website that contains hundreds of user-submitted images. I am creating a backup script that takes all the images from the directory and compresses them into one .tar.gz file. The command I have so...
Started by VinkoCM on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
tar` might receive a list of files instead of one pattern, or none at all, making the commandtar -czpf /path/to/backups/my_backup.tar.gz --exclude path/to/images/tmp path/to/images/
This should work (assuming GNU tar):
tar -czpf....
|
|
Hi,
whenever i do tar -pczf file.tar.gz *
it ignores any .htaccess files, and i can't see in the man how to include it. any ideas?
thanks
Started by nixnub on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
At the end will collect all files in the current .
Using.
Try instead:
tar -pczf file.tar.gz .
Do
tar -pczf file.tar.gz).
The problem isn't tar ; the shell does not include hidden files in * .
|
|
I've received a Unix software distribution as a compressed cpio file. What's the best command to extract the files?
Started by Mark Harrison on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at superuser):
Take a look here
CPIO HOW-TO.
And, here is an example of using cpio with the tar format .
A link from the same Wikipedia page discusses comparison with tar archives .
Manual.
|
|
I have the Wordpress tar, latest.tar.gz. Within it is the following structure /wordpress/dirtories/files
When I do the following command I would prefer if I could have it unpack starting at /directories/ and not /wordpress with the goal of installing ...
Started by Marc on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at serverfault):
tar xvzf file.tar.gz -C /extract/point/
To strip down the parent directory:
tar zxvf latest.tar.gz --strip 1
If you want to be sure that nothing from the parent directory is extracted:
tar zxvf ) was introduced in tar 1.14....
|
|
I'm using Perl's Archive::Tar module. It preserves the file permissions but doesn't preserve the sticky bit. At the other end where I extract the archive, all the sticky bits are gone. I think UNIX/LINUX operating system stores these sticky bits somewhere...
Started by ram on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
From a brief glance, it appears that
$Archive::Tar::CHMOD ....
Not sure, but on the official tar command, you need to pass -p to make this happen
You might want to take a look at the Archive::Tar documentation for the details.
|