Copying multiple files with scp
You can copy all files in directory but problem is when you are trying to copy several files from huge directory. Below is the method I use to achieve needed:
- save list of names of needed files with their paths into the test file (ex: scpList.txt) - full path is needed!
- assign this list to the variable: scpList=$(echo \";for file in $(cat scpLoad.txt); do printf $file ; printf " "; done; echo \")
- manually copy variable content: echo $scpList
- mkdir ~/Desktop/scpFiles
- scp root@srvIP:insertCopiedVariableContentHere ~/Desktop/scpFiles
No comments:
Post a Comment