Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rsync -zav root@server:/home/aaa .
- ps aux | grep rsync
- root 6117 8.9 0.7 87524 60604 ? Ds 00:23 0:26 rsync --server --sender -vlogDtprz . /home/aaa
- root 6339 8.6 0.6 87524 58792 ? Ds 00:23 0:25 rsync --server --sender -vlogDtprz . /home/aaa
- #!/bin/bash
- client_ip=$1
- client_id=$2
- client_path=$3
- rsync_script=~/rsync_CID$client_id
- echo "rsync -zav /home/aaa root@$client_ip:$client_path" > $rsync_script
- sh $rsync_script
- rm $rsync_script
- pstree $(pgrep CID$client_id) -ap | sed -n 's/.*rsync,([0-9]*).*/1/p'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement