Longest Command In Crosh Today

echo [32,767 copies of the letter 'A'] At character 32,768, Crosh returns:

The command:

For example, using a printf built-in (or just pressing Tab to trigger auto-complete), the buffer limit becomes —that is 2^17 - 1 . longest command in crosh

echo [A repeated 1000 times] Result: Success. The shell printed the line perfectly. echo [32,767 copies of the letter 'A'] At

So, what happens when you try to break them? What is the you can type before Crosh gives up? So, what happens when you try to break them

I decided to find out. In a standard Bash shell on Linux, the limit is usually around 128KB to 1MB (defined by ARG_MAX ). Crosh, however, is different. It is built on ash (Almquist shell) with a custom frontend running inside the Chrome browser process.

# Generate a 32,767-character argument printf 'A%.0s' 1..32767 | xargs -0 echo Note: The above command requires xargs , which may not be available in stock Crosh. You have been warned. Did I miss a longer command? Do you know a hidden built-in that bypasses the limit? Let me know in the comments.