/savebuf [-sgao] [lines] <window | dialog id> <filename>
things in []'s are optional, this is common in most of the help files out there so you don't have to specify how many lines you wan't to save, and if you don't specify anything it probably saves all the lines?