number of columns for formatting of dumps, default is 80.

My question: "-width=999999" is not so good.. "-width=0" isn't working. How can I give the "-width" an infinite number?

UPDATE: I am just trying to download a txt file (that has longer lines) with:

lynx --dump foo.com/bar.txt
  • Are you using it to dump data or actually browse with it?
    – slm
    Jan 24, 2014 at 22:08
  • Then a <hr> would turn into an infinitely long horizontal rule. What are you trying to achieve? Jan 25, 2014 at 0:39
  • updated the question Jan 31, 2014 at 12:18
  • 1
    Hm, any reason for not using wget, curl? Or even nc?
    – peterph
    Feb 3, 2014 at 20:34

1 Answer 1


short: you can't do this with lynx

long: the -width option applies to formatted output. wget and curl do not format their output (those are comparable to the -source option of Lynx).

Formatted output pertains to what you see on the screen. Except for demonstration purposes, your screen will be no more than a few hundred columns of text (usually much less).

While most fixed-length buffers have been rewritten in the source code, the maximum line-length for formatted output from Lynx is still a compiled-in constant (1024). Changing that is more than simply changing a number and recompiling, because Lynx manages memory pools which include data structures containing these (fixed-length lines). If you increased the maximum length of a line, then that would change the block-size used for the memory pool (or make it less efficient by storing fewer lines in a block).

The command-line -width option is limited because of this, in the main program:

/* -width */
static int width_fun(char *next_arg)
    if (next_arg != 0) {
    int w = atoi(next_arg);

    if (w > 0)
        dump_output_width = ((w < MAX_COLS) ? w : MAX_COLS);

    return 0;

Further reading: src/GridText.c, where the relevant data structures are defined.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .