Re: Large number of files in single directory

From: Stephen Carville (stephen_at_totalflood.com)
Date: 05/26/05

  • Next message: Arulraj: "Printing through thinclient"
    Date: Wed, 25 May 2005 15:01:44 -0700
    To: General Red Hat Linux discussion list <redhat-list@redhat.com>
    
    

    Rigler, Stephen C. wrote:
    > I think you want to use the "-A" switch to append (concatenate) files to
    > an archive. Look at "man tar". I'm not sure if this works with
    > compressed (gzip'd) archives though, so you might need to compress after
    > the tar is done.

    Oops! That should be

    $ sudo find <directory> -exec tar -rvf foo.tar {} \;

    -r means add files to the end of an archive. -A is to concatenate two
    tar files.

    > -Steve
    >
    > On Wed, 2005-05-25 at 11:51 -0700, Chris wrote:
    >
    >>----- Original Message -----
    >>From: "Stephen Carville" <stephen@totalflood.com>
    >>Sent: Wednesday, May 25, 2005 10:50 AM
    >>Subject: Re: Large number of files in single directory
    >>
    >>
    >>>Try:
    >>>
    >>>$ find <directory> -exec tar -avf foo.tar {} \;
    >>
    >>Didn't work. The -a is an invalid option on Fedora, it seems. I replaced
    >>it with -cz to create and compress the tar file, but even with that, it goes
    >>through the list of files (lists them one per line) as if it was actually
    >>taring them, but the resulting .tar file only has the very LAST file that
    >>tar listed - and nothing else in it. :-?
    >>
    >>Chris
    >>
    >>
    >
    >

    -- 
    Stephen Carville <stephen@totalflood.com>
    Unix and Network Admin
    Nationwide Totalflood
    6033 W. Century Blvd
    Los Angeles, CA 90045
    310-342-3602
    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: Arulraj: "Printing through thinclient"

    Relevant Pages

    • Re: Use tar to append?
      ... Are you saying that this is not how compressed tar archives are ... and compress the new archive. ... Try the same thing with the archives compressed, ... Well, tar was created for use with tape drives, with limited to no ...
      (Fedora)
    • Re: tar.gz
      ... > to me why you need to use both tar and gz. ... I assume gz is GZIP and like any other ZIP, ... tar archives a set of files in one tar-file, preserving access-bits, ... It doesn't compress though. ...
      (comp.sys.atari.st)
    • Re: Large number of files in single directory
      ... Look at "man tar". ... compressed archives though, so you might need to compress after ... > it with -cz to create and compress the tar file, but even with that, it goes ... > through the list of files (lists them one per line) as if it was actually ...
      (RedHat)
    • Re: [SLE] Is the hard disk full? Long post.
      ... tree. ... As I know tar doesn't compress so I ... You're right - tar doesn't compress. ... Also check the archives at http://lists.suse.com ...
      (SuSE)
    • Re: cvs commit: src/usr.bin/tar Makefile bsdtar.1 bsdtar.c bsdtar.h bsdtar_platform.h matching.c rea
      ... the last official spec for tar. ... extensions even when not absolutely required. ... format won't use SUSv3 extensions just to store atime/ctime ... and some cpio archives. ...
      (freebsd-current)