Command Line – How to Save Existing Command Line Text on Screen to a File command linetext; On tty2, how do I take a text screenshot of the command line? Best Answer If you can use tmux or screen, they have the ability to save the scrollback buffer to a file. Write all tmux scrollback to a file Copying GNU screen scrollback buffer to file (extended hardcopy)? Unlike screendump, which is Linux-only, tmux and screen are available for BSD-based OSes too (e.g. macOS, FreeBSD) and won't require special permissions. Related SolutionsHow to logout from a graphical environment from the command line /usr/bin/gnome-session-save --kill works for me on Fedora 15 Alpha with gnome as my DE. Hope that helps. Determine the new line character in a text file file will report on line endings for text files. If you run file on an ASCII Unix/Linux/OSX text file, for example, it will report simply: $ file test.txt test.txt: ASCII text If, however the file has DOS/Windows line-endings, it will instead report: test.dos: ASCII text, with CRLF line terminators Up to OS 9, Macs used CR as the line ending. When presented with such a file, file will report: test.mac: ASCII text, with CR line terminators With OSX, Macs converted to standard Unix line endings. Related Question
Best Answer
If you can use
tmux
orscreen
, they have the ability to save the scrollback buffer to a file.Unlike
screendump
, which is Linux-only,tmux
andscreen
are available for BSD-based OSes too (e.g. macOS, FreeBSD) and won't require special permissions.