Friday, October 17, 2014

From list of content , grep the

# for i in $(cat slist.txt | awk '{print $1}') ; do echo ; echo checking $i ; nexec $i cat /etc/redhat-release  ; done ; echo
checking host13
Red Hat Enterprise Linux Server release 6.3 (Santiago)
checking host14
Red Hat Enterprise Linux Server release 6.3 (Santiago)
checking host22
Red Hat Enterprise Linux Server release 5.8 (Tikanga)
checking host57
Red Hat Enterprise Linux Server release 5.9 (Tikanga)

============firewall check===========
Testing from mylxserv05 to backup_serv01
$ nc -z -v -w 1 172.25.10.10 1500
nc: connect to 172.25.50.10 port 1500 (tcp) failed: Connection refused
Testing from backup_serv01 to mylxserv05
$ nc -z -v -w 1 172.26.10.25 1500
Connection to 172.26.10.25 1500 port [tcp/vlsi-lm] succeeded!

#!/bin/ksh
/usr/bin/rsync -logtprz --exclude-from=/var/tmp/rsync.exclude --progress --rsync-path="sudo rsync" --rsh='ssh -l dev' /opt/ dev@sunsrv445:/opt/

# cat >/var/tmp/rsync.exclude
# user relative path to the source rsync dir
# for eg, /opt/ and want to exclude /opt/users just use /users
/users

No comments:

Post a Comment