Question: I want to know if the Swap is used at all. `free` shows the usage of the memory:

```
# free
          total        used        free      shared  buff/cache   available
Mem:        1362084      169864       38288         724     1153932     1163816
Swap:       1048572           0     1048572

```

My understanding is that this is just a snapshot of the memory usage. The numbers change if I repeat the `free` command.

Is there a possibility to see if the Swap was even used?

Answer: 
From within a Screen window, run

```
screen -X hardcopy -h s
vim s
rm s

```

`hardcopy -h` dumps the scrollback into a temporary file which you can then open in Vim if you like. If you script this you should use a proper temporary file name:

```
#!/bin/sh
scrollback_file=$(mktemp)
screen -X hardcopy -h "$scrollback_file"
vim -c 'call delete(@%)' "$scrollback_file"

```

(Or you could just run your shell in Emacs or in Neovim.)
If you don't mind running the command again, you can always do

```bsh
<command> | vim -

```

If you also care about `stderr`:

```bsh
<command> 2>&1 | vim -

```

Specially useful if you want to search for a pattern and open vim in that location:

```bsh
grep -iIrHn <pattern> | vim -

```

then place the cursor at the line line of the pattern and press `gF`