SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rsync -zav root@server:/home/aaa .
  2.    
  3. ps aux | grep rsync
  4.  
  5. root      6117  8.9  0.7  87524 60604 ?        Ds   00:23   0:26 rsync --server --sender -vlogDtprz . /home/aaa
  6. root      6339  8.6  0.6  87524 58792 ?        Ds   00:23   0:25 rsync --server --sender -vlogDtprz . /home/aaa
  7.    
  8. #!/bin/bash
  9.  
  10. client_ip=$1
  11. client_id=$2
  12. client_path=$3
  13. rsync_script=~/rsync_CID$client_id
  14. echo "rsync -zav /home/aaa root@$client_ip:$client_path" > $rsync_script
  15. sh $rsync_script
  16. rm $rsync_script
  17.    
  18. pstree $(pgrep CID$client_id) -ap | sed -n 's/.*rsync,([0-9]*).*/1/p'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top