SCP how to
Can one use SCP to copy just some of the files in a directory at one time or will they have to be copied one at a time.
Example: There are 12 files in a directory and only 4 of them need to be copied to a new location. I understand how to copy one or even the entire directory. Man scp and info scp does not help. Most of the time I can't figure out what man or info are saying about a command or what the options with the command mean. I learn by trial and error and asking a lot of questions. Thanks |
You could list the files separated by spaces,
like this: Code:
mingdao@peter:~$ ls -alc |
if you have a txtfile including the filenames of the files to be copied you can use:
scp `cat filename` user@host:/home/~user |
I like the idea of a txt file with the names of the files listed if it works but I can't get it to work.
How does the contents of the txt file have to be written? |
simply the filename.
Code:
$ cat filelist.txt |
Thanks, I got it to work. I like it!
|
All times are GMT -5. The time now is 02:15 AM. |