what's a workaround for this? -bash: /bin/mv: Argument list too long -- Regards, Mark Quitoriano, CCNA Fan the flame... http://www.spreadfirefox.com/?q=user/register&r=19441 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20060615/6946660e/attachment-0002.html>
On Thu, 15 Jun 2006 at 10:41pm, Mark Quitoriano wrote> what's a workaround for this? > > -bash: /bin/mv: Argument list too longMore info would be helpful, but as a first approximation: tar cO $LISTOFSTUFFTOMOVE | tar xC /path/to/move/stuff/to -f - -- Joshua Baker-LePain Department of Biomedical Engineering Duke University
> what's a workaround for this? > > -bash: /bin/mv: Argument list too longdo things in batches rather than all at once - so sort alphabetically or something
On 15/06/06, Mark Quitoriano <markquitoriano at gmail.com> wrote:> what's a workaround for this? > > -bash: /bin/mv: Argument list too longIsn't it usually xargs? http://www.google.co.uk/search?hl=en&q=Argument+list+too+long&meta Yep. Will.
On Thursday 15 June 2006 10:41, Mark Quitoriano wrote:> what's a workaround for this? > > -bash: /bin/mv: Argument list too longcan't you use something like find . -exec mv {}?\; /new/location it's just an idea like this... if not mv a* .. mv b* .. etc
On Thu, 2006-06-15 at 22:41 +0800, Mark Quitoriano wrote:> what's a workaround for this? > > -bash: /bin/mv: Argument list too longMore info? Well, presuming you want to move a whole (sub-directory) of stuff, the quick and painless way is a find piped to cpio. You'll need to review a cpio or find man page, but something like this might be useful find [abc]* -depth | cpio -pdumav </your/target/directory> The "-depth" is optional, but has uses. The cpio "a" resets the access time (a problem if your source is read only, drop it) and the "v" says be noisy about your job. HTH> <snip>-- Bill -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.centos.org/pipermail/centos/attachments/20060615/8640006b/attachment-0002.sig>
On Thu, 2006-06-15 at 22:41 +0800, Mark Quitoriano wrote:> what's a workaround for this? > > -bash: /bin/mv: Argument list too longAlmost forgot. Instead of find, if the names can be echoed into a file, then cpio -pdumav </your/target/directory> </the_input_file> <snip>-- Bill -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.centos.org/pipermail/centos/attachments/20060615/f6e497d9/attachment-0002.sig>
On Thursday 15 June 2006 10:56, William L. Maltby wrote:> On Thu, 2006-06-15 at 22:41 +0800, Mark Quitoriano wrote: > > what's a workaround for this? > > > > -bash: /bin/mv: Argument list too long > > Almost forgot. Instead of find, if the names can be echoed into a file, > then > > cpio -pdumav </your/target/directory> </the_input_file > > > <snip>or if you do it with a file .. ls dir > file.txt perl -pi -e 's/^/mv /' file.txt perl -pi -e 's/$/\/new\/path\/for\/files/' file.txt chmod a+x file.txt ./file.txt ...