It's simple command for transfer a large number of small files over ssh.
You need to first go to directory, if you want to copy content of directory.
cd /var/www
tar cpf - ./ | ssh <user>@<dest_ip> "tar xpf - -C /var/www"Preview speed copy with pv:
| #!/bin/bash | |
| PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
| HOST=smtp.yandex.ru | |
| [email protected] | |
| PASSWORD=password | |
| PORT=465 | |
| TO=$1 | |
| SUBJECT=$2 |
| #!/bin/bash | |
| ip=`echo $SSH_CONNECTION | cut -d " " -f 1` | |
| hostname=`hostname` | |
| fqdn=`hostname -f` | |
| logger -t ssh-wrapper $USER login from $ip | |
| sendmail -t <<EOF | |
| To: Alex <[email protected]> |
| firewall_enable="YES" | |
| firewall_script="/etc/rc.firewall" | |
| firewall_logging="YES" |
| #!/usr/bin/env php | |
| <?php | |
| if (count($argv) == 4) { | |
| $token = trim($argv[1]); | |
| $subject = trim($argv[2]); | |
| $body = trim($argv[3]); | |
| $subject = str_replace("PROBLEM:", "\xF0\x9F\x93\x9B PROBLEM:", $subject); | |
| $subject = str_replace("OK:", "\xE2\x9C\x85 OK:", $subject); |
| #!/usr/bin/python | |
| """ | |
| ALK 2014-04-08 | |
| aggregate.py: IPv4 & IPv6 replacement (in spirit) for Joe Abley's 'aggregate' command | |
| note: not a drop-in replacement for the original 'aggregate' command - command line flags are different | |
| requirements: IPy class (debian: python-ipy package) | |
| input: list of IPv4 and/or IPv6 addresses and/or subnets (filename or STDIN) | |
| output: aggregated list if subnets (STDOUT) |
| #!/bin/bash | |
| old_path='/home/old_site/public_html' | |
| new_path='/home/new_site/public_html' | |
| files=" | |
| ./core/config/config.inc.php | |
| ./manager/config.core.php | |
| ./connectors/config.core.php | |
| ./config.core.php |
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import paramiko | |
| from paramiko.ssh_exception import SSHException, BadHostKeyException | |
| from paramiko.ssh_exception import AuthenticationException | |
| from time import sleep |
| #! /bin/sh | |
| ######################################################################################## | |
| # Compresses old radacct detail files and removes very old compressed radacct files. | |
| ######################################################################################## | |
| # Author: P. Tomulik | |
| ######################################################################################## | |
| # Path to the programs used (for environments without $PATH set) | |
| FIND=/usr/bin/find |