Skip to main content
2 of 2
clean up grammar; improve title; remove unneeded "linux" tag (this q is not Linux-specific)
strugee
  • 15.4k
  • 18
  • 81
  • 121

Downloading files over ssh based on a list of filenames

So here is what I have done already:

I have a file called abc.txt which contains list of files. I am using abc.txt to move those files to a folder, tar that folder and finally I download the tar to my local PC from my server, which is running GNU/Linux.

Here are the steps in list form:

  1. abc.txt
  2. abc.txt (listed files) -> folder
  3. Folder -> folder.tar
  4. folder.tar -> local PC.

If abc.txt contains 2 files, for example:

example1.css
example2.css

I need to download those files from abc.txt separately and directly to the local PC.

Since ftp or sftp need the file name to download it, how can I read that from abc.txt?

Mano
  • 299
  • 2
  • 6
  • 13