the joy and non-joy of globbing

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

 



  as a quick demonstration on how globbing might run into the shell
limits, try the following few commands.  first, just try:

  $ ls /*

the output of this command is not important, all that's important is
that the shell had to expand the wildcarding to generate the command
to run.

  if that worked, push it a bit harder:

  $ ls /*/*

  if that worked, a bit harder still:

  $ ls /*/*/*

sooner or later, you'll hit the shell's limit as to just how large a
command it can construct.

rday

p.s.  note that you need to do this with an executable command like
"ls". trying it with "echo" won't cause it to fail the same way as
"echo" is a shell built-in.  the actual limit is, i believe, in the
exec() system call, but i'm willing to be corrected.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux