Book Image

Getting Started with tmux

By : Victor Quinn
Book Image

Getting Started with tmux

By: Victor Quinn

Overview of this book

Table of Contents (16 chapters)
Getting Started with tmux
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Advanced paste buffer usage


We just covered paste buffers in the last chapter, but there is more than we were able to cover there. So let's cover some of the more advanced usage first while it's fresh in our memory. We'll touch on the following advanced paste buffer topics:

  • Saving a paste buffer to a file

  • Loading a paste buffer from a file

  • Setting a paste buffer directly

  • Capturing pane contents to a paste buffer

  • Deleting copied text from a paste buffer

  • Clearing the paste buffer history

Saving a paste buffer to a file

Assume you've just copied a lot of excellent text to the paste buffer and now you want to save it to a file.

Of course, you could open a text editor, paste the contents of the buffer, and save a new file; however, tmux provides us with a handy way to save a paste buffer directly to a file without all that fuss.

So jump back into your tmux session or start a new one and let's go!

  1. First, find some text to copy. It could be any file with some text in it. For example, we have a sample file...