Jon Nelson on 6 May 2005 19:14:13 -0000


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

Re: [PLUG] Tutorials


Mike Chirico said:
> 150 Linux Tips
> http://souptonuts.sourceforge.net/how_to_linux_and_open_source.htm
>
> Over 150 Linux and open source tips that I have collected. I try to
> update this every few days.

Very cool, but I can't believe that your beating up on poor 'tar':

---------------snip----------------------------snip--------------------------------------

     STEP 2 (Piping the files to tar)

          cpio works like tar but can take input
          from the "find" command.

           $ find ../dir1/ | cpio -o --format=tar > test.tar
               or
           $ find ../dir1/ | cpio -o -H tar > test2.tar

---------------snip----------------------------snip--------------------------------------

Sure it can and so can any other command with 'xargs':

    $ find ../dir1/ | cpio -o --format=tar > test.tar

would be:

    $ find ../dir1/ | xargs tar cvf test.tar

I also didn't see anyway that 'cpio' itself could compress the file like
'tar' can.

'tar' is your friend and even better with 'xargs'

Keep in mind if your files have spaces in the file names you will need
'-print0' at the end of the find command.

Jon

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug