Xref: utzoo comp.unix.questions:8988 comp.unix.wizards:10711 Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!gatech!emcard!ncrats!iccdev!mark From: mark@iccdev.UUCP (Mark Wutka) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: tar frustration Message-ID: <337@iccdev.UUCP> Date: 26 Aug 88 18:39:42 GMT References: <1670003@hpcilzb.HP.COM> <5762@super.upenn.edu> <2858@ttrdc.UUCP> <1249@mcgill-vision.UUCP> Organization: Industrial Computer Corp., Atlanta Lines: 37 In article <1249@mcgill-vision.UUCP>, mouse@mcgill-vision.UUCP (der Mouse) writes: > In article <2858@ttrdc.UUCP>, levy@ttrdc.UUCP (Daniel R. Levy) writes: > > All this points up a "feature" of tar which I find frustrating: > > [...can't take random filenames except in argument list...]. "cpio" > > circumvents this problem, since I can feed it a list of files, but > > what if I don't WANT to use cpio? > > You use a tar that can take filenames from stdin. Mine can. I think > Gilmore's can. (Mine also treats absolute pathnames on the tape > specially, and has other frills.) If you don't have a tar that will take files from stdin, you can try what I have used here: tar `cat listoffiles` Hopefully this will work right on your shell. You can list the files one per line if you like. I'm not sure if all the shells do this, but the one I use - ksh - will concatenate the files into one long line separated by spaces. Be careful, though, it may bomb if you give it some enormous number of files. I haven't had a blow-up with several hundred files, though. If you want to make tar take from stdin, just try: tar `cat` This will works with other commands, of course. The only one that comes to my mind right now is "ar". If you want to create a library and can't really use wildcards you can do it this way. -- ...!gatech!ncrats!iccdev!mark This is what happens when I roll my head on the keyboard: kijmuhnyjuygikmluhygbtnjkm,l.jhnubgyvfnjmuki,lmnjhbgv