-11

As an editor, I try to improve answers (often by trimming) without conflicting with author intent. However, I came across an answer that could not be shortened as much as I would like, so I posted another one.

Original answer:

How can I write all the scrollback in a tmux session to a file?

From the manual: ‘-’ to -S is the start of the history.

So

tmux capture-pane -pS - > file

This will "write all the scrollback in a tmux" pane.

For all pane's in the session, you can try to loop through all the panes with tmux list-panes -s ...

If that's what you needed, I might update this answer.

My new answer:

Save everything:

tmux capture-pane -pS - > tmux.log

I think the succinctness makes the answer easier to find and use.

To risk a loaded question: are short, minimal, but complete answers not valuable?


EDIT: I have deleted my former answer and edited the other answer instead. The proposed edit looks better than I thought it would. Perhaps there are better case studies of this situation.

5
  • 3
    That's what edits are for. If you think answer can be improved, go ahead and edit it. If others disagree and the edit is rejected/rolled back then just let it go, knowing you did your best. :) Aug 2, 2021 at 11:12
  • 9
    Why would an answer with less information be better? That’s like cutting away the tenderloin from my T-bone steak and claiming it’s a good thing because it fits on the plate better. Making a post less verbose can be done without removing relevant information. The explanation of what the manual says is relevant, not fat to be trimmed away.
    – ColleenV
    Aug 2, 2021 at 11:17
  • 4
    What you've done is usually called a 'duplicate answer' and sites do have policies stating those are eligible for deletion since they don't add anything relevant that isn't already there, and plagiarize existing answers. Especially if those "answers" are posted years and years after the question was asked. That said, I don't know the specific policy for Unix & Linux, but the flagging for deletion suggests they have a similar policy.
    – Tinkeringbell Mod
    Aug 2, 2021 at 11:49
  • 1
    Alternative: Rearrange the text to use the inverted pyramid (not deleting any information). Make sure the edit summary makes it very very clear what is going on. Aug 4, 2021 at 11:51
  • @P.Mort.-forgotClayShirky_q That's a nice way to get the best of both worlds. I'll incorporate that style more into my edits (with care). The point of my shorter answer was precisely to put the important information immediately accessible to a person scrolling through a question. In fact, I've been on that question a couple of times in the past year and usually skipped over that particular answer. I only noticed it when I discovered the answer in man tmux capture-pane and decided to post my own answer and checked to see if anyone had already written an answer about it before... Aug 4, 2021 at 12:31

1 Answer 1

25

That whole original answer fits on the screen of my phone, so really it isn't that long.

Besides that your answer offers no learning opportunity to the reader, and people just have to believe that this works without knowing why it does. That's why the other one is better.

Finally, duplicating an existing answer, like you just admitted to, without proper attribution is considered plagiarism.

You must log in to answer this question.

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