Mailinglist Archive: opensuse (4631 mails)

< Previous Next >
Re: [opensuse] tar
  • From: Kenneth Schneider <suse-list3@xxxxxxxxxxxxx>
  • Date: Sun, 21 Jan 2007 16:52:48 -0500
  • Message-id: <1169416368.28032.31.camel@xxxxxxxxxxxxxxxxx>
On Sun, 2007-01-21 at 14:32 -0700, John Meyer wrote:
> Kenneth Schneider wrote:
> > What have you tried already so we don't suggest versions of the tar
> > command that have not worked for you?
>
> cd $HOME && tar uzf $HOME/backups/Pictures.tar.gz Pictures
>
>
> Result:
>
> tar: Cannot update compressed archives
>
>

cd $HOME && gunzip backups/Pictures.tar.gz && tar uf
$HOME/backups/Pictures.tar Pictures && gzip -9 backups/Pictures.tar

Or if you put all of this into a script file it would look like

******************************************

#!/bin/bash
cd /home/<your_user_name>
gunzip backups/Pictures.tar.gz
tar uf $HOME/backups/Pictures.tar Pictures
gzip -9 backups/Pictures.tar

******************************************

And make sure to make the file executable with chmod +x
<file_name_you_used_for_the_script>

--
Ken Schneider
UNIX since 1989, linux since 1994, SuSE since 1998

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >