在Bash中扩展*的长度限制? [英] Limits of length for the expansion of * in Bash?

查看:74
本文介绍了在Bash中扩展*的长度限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Bash中

echo *

几乎等同于ls.

您可以做类似的事情

echo */*-out/*.html > all-my-html-files-on-one-line

由于*命令行参数,所以长度上应有限制.

Since * is a command line argument then there should be a limit on the length.

那是什么限制?

echo Bash命令和/bin/echo程序之间的限制是否不同?

Is the limit different between echo the Bash command and /bin/echo the program?

推荐答案

shell对此没有限制

The shell does not limit this

您可以使用(在我的64位linux上运行:)

You can see the limit for your system with (run on my 64bit linux:)

$ getconf ARG_MAX
2097152

请参阅此非常有信息的页面 http://www.in-ulm. de/〜mascheck/various/argmax/

See this very informational page http://www.in-ulm.de/~mascheck/various/argmax/

这篇关于在Bash中扩展*的长度限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆