Gregg's MOTD

Tips & Tricks that I've Encountered Over the Years...

scp’ing Files using a Text File List

July 12, 2023 — Gregg Szumowski

If you have a collection of files that you want to transfer to a remote server and they are a subset of files in the current directory or scattered among different directories you can create a list of files and then pipe the list to scp:

$ cat filelist.txt | xargs -i scp {} user@remote:~/backup/

Tags: cli, xargs, scp, motd

Edit a Remote File Using Vim

May 28, 2023 — Gregg Szumowski

To edit a file remotely using the vim editor, just do the following in a terminal window:

$ scp://username@IP-address//path/to/file.txt


The user must have access to the file being edited.

Tags: cli, vim, scp, motd