tech-userlevel archive

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

Re: bin/44246: enhance mv to work better with xargs



On Mon, 14 Jan 2013, James K. Lowden wrote:

On Sat, 12 Jan 2013 20:21:59 -0600
schnoebe%netbsd.org@localhost (Eric Schnoebelen) wrote:

I've taken a look at bin/44246 and attempted to implement an
enhancement to resolve the PR.

I really don't see the problem.

        $ echo * | xargs mv newdir

fails, yes, but

        $ echo * newdir | xargs mv

works.

It only works while the expansion of * is shorter than xargs's maximum command length. Once you exceed that limit, you fail.


-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index