I have a CD with a number of files on. I am trying to extract a list for files with a certain extension and then copy them to another location with the directory structure intact. To do this I choose tar and find: cd /mnt/cdrom tar -cf ~ash/test.tar `find . -name "*.dwg" -print` This would create a tarball, which I could copy, and expand into a new location. However, on running the command the following error is returned: "/bin/tar Argument list too long" There are probably around 4000 files on the CD with a .dwg extension. How can I get around this problem? Is there a better solution to what I am trying to achieve? -- Ashley T. Howes, Ph.D http://www.ashleyhowes.com "when all the animals of this world are gone, man will die of loneliness"
Ashley <ashley@ashleyhowes.com> wrote:
cd /mnt/cdrom
Try this: find . -name '*.dwg' -print >/tmp/test.manifest tar -cf ~ash/test.tar --files-from /tmp/test.manifest Untested, no warranty, etc. -- MJR ,---------------------------------------------------- | Q. Do you need a net-based application developing, | or advice and training about web technology? | A. I suggest you try http://www.luminas.co.uk/
On Mon, Jun 10, 2002 at 02:55:28PM +0000, MJ Ray wrote:
Ashley <ashley@ashleyhowes.com> wrote:
cd /mnt/cdrom
Try this:
find . -name '*.dwg' -print >/tmp/test.manifest tar -cf ~ash/test.tar --files-from /tmp/test.manifest
You might be able to do: find . -name '*.dwg' -print |tar -cf ~ash/test.tar --files-from - too, but again, it's not tested. P.
participants (3)
-
Ashley -
MJ Ray -
Paul Russell