This is a discussion on tar question within the Sun Solaris Administration forums, part of the Solaris Operating System category; --> I have the following... rgdb with... db1 db2 db3 db4 db5 Within the rgdb directory. I want to tar ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I have the following... rgdb with... db1 db2 db3 db4 db5 Within the rgdb directory. I want to tar all that is under the rgdb directory (recursive) but not the db5 directory. This is where I want to put the tar file. I want to run this from a script. I did not see any examples in the man pages. And I cant seem to get an handle around this one... Any help.. |
| |||
| In comp.unix.misc LHradowy <laura.hradowy@nospam.mts.ca> wrote: > I have the following... > rgdb > with... > db1 > db2 > db3 > db4 > db5 > Within the rgdb directory. > I want to tar all that is under the rgdb directory (recursive) but not the > db5 directory. This is where I want to put the tar file. > I want to run this from a script. > > I did not see any examples in the man pages. And I cant seem to get an > handle around this one... Well, just use some basic Unix shell lines: tar cf rgdb/db5/bla.tar `ls -d rgdb/*/. | grep -v rgdb/db5/` .... or so. - Hubert -- Want to get a clue on IPv6 but don't know where to start? Try this: * Basics -> http://www.onlamp.com/pub/a/onlamp/2..._tutorial.html * Setup -> http://www.onlamp.com/pub/a/onlamp/2..._tutorial.html Of course with your #1 IPv6 ready operating system -> http://www.NetBSD.org/ |
| |||
| LHradowy wrote: > > I have the following... > rgdb > with... > db1 > db2 > db3 > db4 > db5 > Within the rgdb directory. > I want to tar all that is under the rgdb directory (recursive) but not the > db5 directory. This is where I want to put the tar file. > I want to run this from a script. > > I did not see any examples in the man pages. And I cant seem to get an > handle around this one... > Any help.. tar cvf repository ./rgdb/db1 ./rgdb/db2 ./rgdb/db3 ./rgdb/db4 -- Fletcher Glenn email f-g-l-e-n-n@quest.com (remove the dashes) |
| |||
| In article <AFmOa.6378$V8.3982@news1.mts.net>, LHradowy <laura.hradowy@NOSPAM.mts.ca> wrote: >I have the following... >rgdb >with... >db1 >db2 >db3 >db4 >db5 >Within the rgdb directory. >I want to tar all that is under the rgdb directory (recursive) but not the >db5 directory. This is where I want to put the tar file. >I want to run this from a script. star -c -V pat=db5* -C rgdb . > /tmp/somfile.tar ftp://ftp.berlios.de/pub/star http://www.blastwave.org/packages.php -- EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin js@cs.tu-berlin.de (uni) If you don't have iso-8859-1 schilling@fokus.fraunhofer.de (work) chars I am J"org Schilling URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily |
| |||
| In article <becvv4$3nlsq$1@ID-180809.news.dfncis.de>, Hubert Feyrer <hubert@feyrer.de> wrote: >In comp.unix.misc LHradowy <laura.hradowy@nospam.mts.ca> wrote: >> I have the following... >> rgdb >> with... >> db1 >> db2 >> db3 >> db4 >> db5 >> Within the rgdb directory. >> I want to tar all that is under the rgdb directory (recursive) but not the >> db5 directory. This is where I want to put the tar file. >> I want to run this from a script. >> >> I did not see any examples in the man pages. And I cant seem to get an >> handle around this one... > >Well, just use some basic Unix shell lines: >tar cf rgdb/db5/bla.tar `ls -d rgdb/*/. | grep -v rgdb/db5/` >... or so. Sounds prone to problems..... If the only reason for excluding the directory db5, is to avoid that the tar archive becomes part of itself, just use star. Star will detect the archive and auto-exclude it from the list of files that go into the archive: star -c f=db5/xx.tar . ftp://ftp.berlios.de/pub/star http://www.blastwave.org/packages.php -- EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin js@cs.tu-berlin.de (uni) If you don't have iso-8859-1 schilling@fokus.fraunhofer.de (work) chars I am J"org Schilling URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily |
| |||
| Hallo, I would use the fillowing commands: $ echo rgdb/db5 >/tmp/exclude.$$ $ tar cXf /tmp/exclude.$$ rgdb/db5/dump.tar rgdb $ rm -f /tmp/exclude.$$ With the X parameter, you can define a file containing all the names of files and directories that have to be excluded from the tar file (see the manual pages). Vincent "LHradowy" <laura.hradowy@NOSPAM.mts.ca> wrote in message news:AFmOa.6378$V8.3982@news1.mts.net... > I have the following... > rgdb > with... > db1 > db2 > db3 > db4 > db5 > Within the rgdb directory. > I want to tar all that is under the rgdb directory (recursive) but not the > db5 directory. This is where I want to put the tar file. > I want to run this from a script. > > I did not see any examples in the man pages. And I cant seem to get an > handle around this one... > Any help.. > > > |
| |||
| > I have the following... > rgdb > with... > db1 > db2 > db3 > db4 > db5 > Within the rgdb directory. > I want to tar all that is under the rgdb directory (recursive) but not the > db5 directory. This is where I want to put the tar file. > I want to run this from a script. > > I did not see any examples in the man pages. And I cant seem to get an > handle around this one... > Any help.. How would I compress it at the same time, when I try to do a tar zcvf, it does not recognize the -z option... |
| |||
| In article <LzBOa.8114$V8.5450@news1.mts.net>, LHradowy <laura.hradowy@NOSPAM.mts.ca> wrote: >How would I compress it at the same time, when I try to do a tar zcvf, it >does not recognize the -z option... The -z option is only recognised by GNU tar or star ftp://ftp.berlios.de/pub/star http://www.blastwave.org/packages.php -- EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin js@cs.tu-berlin.de (uni) If you don't have iso-8859-1 schilling@fokus.fraunhofer.de (work) chars I am J"org Schilling URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily |
| ||||
| In article <AFmOa.6378$V8.3982@news1.mts.net>, LHradowy <laura.hradowy@NOSPAM.mts.ca> wrote: >I have the following... >rgdb >with... >db1 >db2 >db3 >db4 >db5 >Within the rgdb directory. >I want to tar all that is under the rgdb directory (recursive) but not the >db5 directory. This is where I want to put the tar file. >I want to run this from a script. tar cf db5/file.tar db1 db2 db3 db4 -- Barry Margolin, barry.margolin@level3.com Level(3), Woburn, MA *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups. Please DON'T copy followups to me -- I'll assume it wasn't posted to the group. |