Question about scp

Hi,

if I want scp some videos to my usb's router, is it possible to make it in one shot? Here an exemple;

scp -O /home/james/Downloads/exemple1.mkv root@192.168.1.1:/mnt/sda1/

so that one is ok but if Ihave 5 movies; exemple1, exemple2,3,4,5, I tried some formulas but it did not work.

thanks

Um, how about this:

scp -O /home/james/Downloads/exemple?.mkv root@192.168.1.1:/target/directory

Or this:

scp -O /home/james/Downloads/exemple*.mkv root@192.168.1.1:/target/directory

Note no railing slash.

3 Likes

it was a good idea, the solution is;

scp -O /home/james/Downloads/*.mkv root@192.168.1.1:/mnt/sda1/

thank you

The * may match more than you wanted, for your specific case the following should work:

scp -O /home/james/Downloads/exemple{1,2,3,4,5}.mkv root@192.168.1.1:/mnt/sda1/
1 Like

the problem is the real thing is more about episode, so it is hard to make it..

exemple.S01E01.mkv
exemple.S01E02.mkv

For many small files (not the case here), it is a lot faster to make a tar file and scp it. SCP has a lot of overhead starting the transfer of each file.

If you add option RecvWindowSize '1048576' to /etc/config/dropbear you'll drastically improve your transfer speeds.

It changes it from the default 24 Kilobyte to 1 Megabyte

1 Like

just like that

config dropbear
 3         option Port '22'
 4         option Interface 'lan'
 5         option PasswordAuth 'off'
 6         option RootPasswordAuth 'off'
 7         option RecvWindowSize '1048576'

1 Like

Yes, that's correct. Then restart Dropbear /etc/init.d/dropbear restart or in LuCI and you're set.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.