[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: undo extraction



>>>>> Brian Frederick Kimball writes:

    bfk> Chris Gray wrote:
    >>> I'd rather people didn't use a chainsaw where a butterknife will do
    >>> just as well:
    >>> 
    >>> tar tzf $1 | xargs rm
    >>> 
    >>> will work for those dumbass tarballs where they don't make a new
    >>> directory to put their files.  There might be confusion if there are
    >>> spaces in the filenames, in which case a perl one-liner might be
    >>> called for:
    >>> 
    >>> perl -e 'while (<>){chomp; printf "\"%s\"\n", $_;}'

    bfk> Or just

    bfk>  tar tzf -print0 file.tar.gz | xargs -0 rm

-print0: Cannot open: No such file or directory

I think what you meant is --null, but that has a slightly different
meaning.  So I don't think there's a way to do what you suggested.
(-print0 is an option for find).

Cheers,
Chris

-- 
Got jag?  http://www.tribsoft.com



Reply to: