gamblor01
06-23-2004, 11:06 AM
So I'm new to shell scripts and I don't think I've ever tarred anything before. But I have a directory, let's say /foo with a bunch of directories that I want to tar as backups. So I did the following:
for i in /foo/*
do
gtar -czf $i.tar.gz $i
done
and let it go. It seems to be making .tar.gz files from all the directories, but it's giving me this output which is strange because it didn't happen when I just tried a single tar by itself such as:
gtar -czf bar.tar.gz bar/
When I do a single tar at a time I don't get this output. But when I do it with my loop like I described first I'm getting this output on the command line:
gtar: Removing leading '/' from absolute path names in the archive
gtar: Removing leading '/' from absolute links
with each new tar.gz file that it's creating. Should I be worried about this or is this just a normal occurence?
for i in /foo/*
do
gtar -czf $i.tar.gz $i
done
and let it go. It seems to be making .tar.gz files from all the directories, but it's giving me this output which is strange because it didn't happen when I just tried a single tar by itself such as:
gtar -czf bar.tar.gz bar/
When I do a single tar at a time I don't get this output. But when I do it with my loop like I described first I'm getting this output on the command line:
gtar: Removing leading '/' from absolute path names in the archive
gtar: Removing leading '/' from absolute links
with each new tar.gz file that it's creating. Should I be worried about this or is this just a normal occurence?