use scp to copy all files within directory -- NOT the directory -- to remote location
0
votes
1
answer
81
views
If you read all from post [How to copy all files from a directory to a remote directory using scp?](https://unix.stackexchange.com/q/232946/100397) you will find there is no answer that actually (as in ALWAYS) works, even though a (non)answer has a big green check mark.
I have the following "solution" but am asking whether someone knows a less cumbersome method.
1) Use "scp -r" to copy local_directory to remote_directory -- note that local_directory will be placed within remote_directory which is NOT desired but is easily fixed...
2) On remote machine create links within remote_directory to the files within remote_directory/local_directory -- I recommend the "find" command executing the "ln" command to accomplish this.
3) On remote machine use "rm -r remote_directory/local_directory" to remove unwanted directory.
Asked by user3878084
(11 rep)
May 1, 2025, 02:44 PM
Last activity: May 1, 2025, 03:14 PM
Last activity: May 1, 2025, 03:14 PM