Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Arglist too long...mv'ed crazy
- X-seq: zsh-users 11363
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: meino.cramer@xxxxxx, zsh-users@xxxxxxxxxx
- Subject: Re: Arglist too long...mv'ed crazy
- Date: Sun, 01 Apr 2007 09:49:09 -0700
- In-reply-to: <070331225824.ZM7614@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20070401021034.GA15269@solfire> <070331225824.ZM7614@xxxxxxxxxxxxxxxxxxxxxx>
A couple of other thing I meant to say, but forgot ...
On Mar 31, 10:58pm, Bart Schaefer wrote:
}
} zargs -- ../../cur/* -- mv --target-directory=/back/up/folder
Any zargs call will probably still give a "too many arguments" error
unless you give it a -n option, because zargs is intended for use
with shell functions/builtins where no external argument length limit
is involved. So I really should have suggested one of
zargs -n100 -- ../../cur/* -- mv --target-directory=/back/up/folder
or
print -0 ../../cur/* | xargs -0 mv --target-directory=/back/up/folder
(Note xargs, not zargs, in the latter case.)
} zargs --replace -- ../../cur/* -- mv {} /back/up/folder
That's probably the worst choice in this particular case because it
will run "mv" once for each file, rather than once for each batch of
as-many-files-will-fit.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author