在Bash中扩展*的长度限制?

Ale*_*huk 5 bash command-line command-line-arguments

在Bash

echo *
Run Code Online (Sandbox Code Playgroud)

几乎相当于ls.

你可以做的事情

echo */*-out/*.html > all-my-html-files-on-one-line
Run Code Online (Sandbox Code Playgroud)

由于*命令行参数,因此长度应该有限制.

那个限制是什么?

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

seh*_*ehe 6

shell不限制此

你可以看到你的系统的限制(在我的64位linux上运行:)

$ getconf ARG_MAX
2097152
Run Code Online (Sandbox Code Playgroud)

请参阅此信息页http://www.in-ulm.de/~mascheck/various/argmax/