I want to backup a directory using tar, but want separate tarballs for each
subdirectory. For example:
# ls dir1
subdir1 subdir2 subdir3
Will it possible to do it using only tar command? Or will I need another
separate piece of logic/control? I thought of writing a shell script with
three tar comm
Hi,
> I want to backup a directory using tar, but want separate tarballs for
> each subdirectory. For example:
> # ls dir1
> subdir1 subdir2 subdir3
>
>
> Will it possible to do it using only tar command? Or will I need
> another separate piece of logic/control? I thought of writing a shell
> s
On 1/23/11 2:51 PM, Johan Martinez wrote:
>
> I want to backup a directory using tar, but want separate tarballs for each
> subdirectory. For example:
> # ls dir1
> subdir1 subdir2 subdir3
>
> Will it possible to do it using only tar command?
No, tar only generates a single output stream.
> Or wi
Hello Johan,
On Sun, 2011-01-23 at 14:51 -0600, Johan Martinez wrote:
> I want to backup a directory using tar, but want separate tarballs for
> each subdirectory. For example: # ls dir1
> subdir1 subdir2 subdir3
Use find(1) for such cases.
$ find -mindepth 1 -maxdepth 1 -type d -exec tar cz {
On Mon, Jan 24, 2011 at 8:00 AM, Leonard den Ottolander
wrote:
> Hello Johan,
>
> On Sun, 2011-01-23 at 14:51 -0600, Johan Martinez wrote:
>> I want to backup a directory using tar, but want separate tarballs for
>> each subdirectory. For example: # ls dir1
>> subdir1 subdir2 subdir3
>
> Use find
Hello Nico,
On Mon, 2011-01-24 at 19:21 -0500, Nico Kadel-Garcia wrote:
> On Mon, Jan 24, 2011 at 8:00 AM, Leonard den Ottolander
> > $ find -mindepth 1 -maxdepth 1 -type d -exec tar cz {} -f {}.tgz \;
> Ahh-ahh-ahh! You forgot some subdirectories, especially generated from
> projects served to
6 matches
Mail list logo