일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- Etherchannel
- 장비
- Vlan
- rip
- Chrony
- OSI 7 layer
- Inter VLAN
- ACL
- DHCP
- crontab
- stp
- ipv6
- 헤더
- GLBP
- 라우터
- eigrpv2
- eigrp
- 스위치
- CKA
- 명령어
- vrrp
- Redistribute
- OSPF
- ripng
- NAT
- tunneling
- ospfv3
- Today
- Total
목록분류 전체보기 (123)
Net Eng
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/b0OYLN/btsHWcwC3Rt/KOMKC4A91OVO5uKeSTmysK/img.png)
#!/bin/bashSERVERLIST=/root/bin/server_telnet.txt# 1) 원격 접속 후 백업 수행 -> auto_telnet.sh(tar CMD)# tar CMD: tar czf /tmp/home_$(hostname).tar.gz /homecat $SERVERLIST | while read IP1 UNAME UPASSdo BACKUPFILE="home_$IP1.tar.gz" CmdBackup() { sleep 2 ; echo "$UNAME" sleep 0.5 ; echo "$UPASS" sleep 0.5 ; echo "tar czf /tmp/$BACKUPFILE /home" sleep 0.5 ; ec..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/cDI7HB/btsHV9Nq2Pf/akVpDKVJNar6uqSy28TJd0/img.png)
#!/bin/bash#crontab -e# 0 8 * * * 1-5 /root/bin/check_file >/var/log/file.log 2>&1# cat /root/bin/file_list.txt# /etc/passwd# /etc/group# /etc/hosts# ...# 1) 파일 초기화# 2) 백업 or 파일 비교 작업 -> result_0824.txt# 3) 결과 점검 -> 메일 전송# 1) 파일 초기화RESULT=result_$(date +%m%d).txt> $RESULT# 2) 백업 or 파일 비교 작업 -> result_0824.txtBACKUPDIR=/backupFILE_LIST=/root/bin/file_list.txtTMP1=/tmp/tmp1[ ! -d /backup ] && mkdi..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/szGKg/btsHWChyB2D/XknFI9OykkI3mrV6W3mhmk/img.png)
#!/bin/bash# Variavble definitionsSERVERLIST=/root/bin/server.listALIVESERVERLIST=/root/bin/alive_server.list> $ALIVESERVERLIST# 0) 서버 목록 파일 생성cat $SERVERLIST 192.168.10.20192.168.10.30192.168.10.40192.168.10.50EOF# 1) 살이 있는 서버 목록 만들기cat $SERVERLIST | while read HOST1do # echo "$HOST1" ping -c 1 -W 1 "$HOST1" >/dev/null 2>&1 if [ $? -eq 0 ]; then echo "[ OK ] $HOST1" echo "$HOST1"..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/tEjus/btsHWuw25Aw/xxjAlCgBahMSiofIQmwYt1/img.png)
#!/bin/bashAdminList() { cat = 1000 && $3 /dev/null 2>&1 if [ $? -eq 0 ]; then userdel -r $UNAME \ && echo "[ OK ] $UNAME 사용자가 삭제 되었습니다." \ || echo "[ FAIL ] $UNAME 사용자가 삭제되지 않았스므니다." else echo "[ FAIL ] $UNAME 사용자가 없습니다." fi}UserAdd() { echo "(사용자 추가)" echo -n "추가할 사용자 이름? : " read UNAME useradd $UNAME >/dev/null 2>&1 if [ $? -eq 0 ..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/dgRQdd/btsHVqI9P5I/2AZBaKKj1xnZazRkqE0m91/img.png)
#!/bin/bashUSERLIST=user.listcat $USERLIST | while read UNAME UPASSdo userdel -r $UNAME > /dev/null 2>&1 \ && echo "[ OK ] $UNAME removed." \ || echo "[ FAIL ] $UNAME not removed"done
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bZ64Ey/btsHUHrjGPc/0iGcnbQVPsPHEbku9KfYSk/img.png)
#!/bin/bashUSERLIST=user.listcat $USERLIST | while read UNAME UPASSdo useradd $UNAME > /dev/null 2>&1 \ && echo "[ OK ] $UNAME added." \ || echo "[ FAIL ] $UNAME not added" echo $UPASS | passwd --stdin $UNAME > /dev/null 2>&1 \ && echo "[ OK ] $UNAME password changed." \ || echo "[ FAIL ] $UNAME password not changed"done
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bidpvk/btsHR3nbBUe/zFFDrrZjXs0M9QywkIWJuK/img.png)
import sysclass Coffee: total_amount = 10 total_amount_price = 5000 coffee_price = 300 put_price = 0 # 넣은 금액 req_coffee_nums = 0 # 주문한 커피 개수 remaining_price = 0 # 거스름 돈 def request(self): print("+------------------가격표---------------------") print("| 커피 : 300 |") print("+-----------..