#!/bin/bash
############# start ##################
# copyright(c)조훈현
#시나리오 : 퇴근시간이 다되었고
#애인과 퇴근 1시간후에 약속이 되어있다.
#그런데 긴급한 상황으로 system에 1000명이 넘는 사용자의
#계정에 특정파일을 패치 해야한다.
#수동으로 한다면 4시간으로도 해결은 불가능하다.
#그러나 간단한 shell 프로그래밍은 애인과의 저녁시간을
#확보시켜준다.
#주의 : 단 사용자의 홈디렉토리가 한디렉토리의
#subdiretory 이어만 한다.
####################################
echo " input target file or directory: "
read target
echo " input destination directory : "
read destination
for dir in `ls -l $destination | grep '\<d' | cut -c 57-100`
do
cp -r $target /$destination/$dir
done
echo "complete copy!!!"
exit 0
############# E N D #############
만약 home디렉토리가 /home의 subdiretory가 아니라면
----------------------------------------------
for dir in `ls -l $destination | grep '\<d' | cut -c 57-100`
do
cp -r $target /$destination/$dir
done
----------------------------------------------
를 아래의
------------------------------------------------------------
for dir in `tail +$(cut -f 1,3 -d: /etc/passwd | grep -n 500 | cut -f 1 -d:) /etc/passwd | cut -f 6 -d:`
do
cp -r $target $dir
done
------------------------------------------------------------
로 치환한다
주의!! 이프로그램 실행으로 일어나는 어떠한 책임도 저작권자는 책임이 없음을 밝힙니다.
학습용으로 사용하시길 권장합니다.~~^^<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:32:05 Linux에서 이동 됨]</div>
############# start ##################
# copyright(c)조훈현
#시나리오 : 퇴근시간이 다되었고
#애인과 퇴근 1시간후에 약속이 되어있다.
#그런데 긴급한 상황으로 system에 1000명이 넘는 사용자의
#계정에 특정파일을 패치 해야한다.
#수동으로 한다면 4시간으로도 해결은 불가능하다.
#그러나 간단한 shell 프로그래밍은 애인과의 저녁시간을
#확보시켜준다.
#주의 : 단 사용자의 홈디렉토리가 한디렉토리의
#subdiretory 이어만 한다.
####################################
echo " input target file or directory: "
read target
echo " input destination directory : "
read destination
for dir in `ls -l $destination | grep '\<d' | cut -c 57-100`
do
cp -r $target /$destination/$dir
done
echo "complete copy!!!"
exit 0
############# E N D #############
만약 home디렉토리가 /home의 subdiretory가 아니라면
----------------------------------------------
for dir in `ls -l $destination | grep '\<d' | cut -c 57-100`
do
cp -r $target /$destination/$dir
done
----------------------------------------------
를 아래의
------------------------------------------------------------
for dir in `tail +$(cut -f 1,3 -d: /etc/passwd | grep -n 500 | cut -f 1 -d:) /etc/passwd | cut -f 6 -d:`
do
cp -r $target $dir
done
------------------------------------------------------------
로 치환한다
주의!! 이프로그램 실행으로 일어나는 어떠한 책임도 저작권자는 책임이 없음을 밝힙니다.
학습용으로 사용하시길 권장합니다.~~^^<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:32:05 Linux에서 이동 됨]</div>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 8130 | 9년 전 | 528 | ||
| 8129 |
|
9년 전 | 658 | |
| 8128 | 9년 전 | 522 | ||
| 8127 |
|
9년 전 | 580 | |
| 8126 | 9년 전 | 511 | ||
| 8125 | 9년 전 | 774 | ||
| 8124 |
|
9년 전 | 529 | |
| 8123 | 9년 전 | 512 | ||
| 8122 | 9년 전 | 440 | ||
| 8121 | 9년 전 | 550 | ||
| 8120 | 9년 전 | 473 | ||
| 8119 | 9년 전 | 556 | ||
| 8118 |
|
9년 전 | 639 | |
| 8117 |
|
9년 전 | 411 | |
| 8116 |
PASKRAN
|
9년 전 | 472 | |
| 8115 | 9년 전 | 461 | ||
| 8114 |
kiplayer
|
9년 전 | 601 | |
| 8113 | 9년 전 | 457 | ||
| 8112 |
|
9년 전 | 564 | |
| 8111 | 9년 전 | 412 | ||
| 8110 | 9년 전 | 448 | ||
| 8109 | 9년 전 | 382 | ||
| 8108 |
|
9년 전 | 550 | |
| 8107 |
|
9년 전 | 445 | |
| 8106 |
|
9년 전 | 446 | |
| 8105 | 9년 전 | 479 | ||
| 8104 |
|
9년 전 | 444 | |
| 8103 |
|
9년 전 | 441 | |
| 8102 |
|
9년 전 | 412 | |
| 8101 |
snshero
|
9년 전 | 798 | |
| 8100 | 9년 전 | 848 | ||
| 8099 | 9년 전 | 820 | ||
| 8098 | 9년 전 | 719 | ||
| 8097 | 9년 전 | 526 | ||
| 8096 | 9년 전 | 723 | ||
| 8095 | 9년 전 | 854 | ||
| 8094 | 9년 전 | 525 | ||
| 8093 | 9년 전 | 810 | ||
| 8092 | 9년 전 | 763 | ||
| 8091 | 9년 전 | 1149 | ||
| 8090 | 9년 전 | 776 | ||
| 8089 | 9년 전 | 983 | ||
| 8088 | 9년 전 | 655 | ||
| 8087 | 9년 전 | 776 | ||
| 8086 | 9년 전 | 528 | ||
| 8085 | 9년 전 | 495 | ||
| 8084 | 9년 전 | 615 | ||
| 8083 | 9년 전 | 583 | ||
| 8082 | 9년 전 | 768 | ||
| 8081 | 9년 전 | 476 | ||
| 8080 | 9년 전 | 577 | ||
| 8079 | 9년 전 | 537 | ||
| 8078 | 9년 전 | 456 | ||
| 8077 | 9년 전 | 542 | ||
| 8076 | 9년 전 | 417 | ||
| 8075 | 9년 전 | 451 | ||
| 8074 | 9년 전 | 409 | ||
| 8073 | 9년 전 | 464 | ||
| 8072 | 9년 전 | 459 | ||
| 8071 |
o1o111
|
9년 전 | 908 | |
| 8070 | 9년 전 | 413 | ||
| 8069 | 9년 전 | 349 | ||
| 8068 | 9년 전 | 603 | ||
| 8067 | 9년 전 | 401 | ||
| 8066 | 9년 전 | 432 | ||
| 8065 | 9년 전 | 393 | ||
| 8064 | 9년 전 | 378 | ||
| 8063 | 9년 전 | 348 | ||
| 8062 | 9년 전 | 314 | ||
| 8061 | 9년 전 | 358 | ||
| 8060 | 9년 전 | 399 | ||
| 8059 | 9년 전 | 337 | ||
| 8058 | 9년 전 | 265 | ||
| 8057 | 9년 전 | 396 | ||
| 8056 | 9년 전 | 315 | ||
| 8055 | 9년 전 | 362 | ||
| 8054 | 9년 전 | 372 | ||
| 8053 | 9년 전 | 419 | ||
| 8052 | 9년 전 | 297 | ||
| 8051 | 9년 전 | 342 | ||
| 8050 | 9년 전 | 398 | ||
| 8049 | 9년 전 | 333 | ||
| 8048 | 9년 전 | 442 | ||
| 8047 | 9년 전 | 375 | ||
| 8046 | 9년 전 | 320 | ||
| 8045 | 9년 전 | 271 | ||
| 8044 | 9년 전 | 352 | ||
| 8043 | 9년 전 | 304 | ||
| 8042 | 9년 전 | 303 | ||
| 8041 | 9년 전 | 362 | ||
| 8040 | 9년 전 | 286 | ||
| 8039 | 9년 전 | 326 | ||
| 8038 | 9년 전 | 275 | ||
| 8037 | 9년 전 | 414 | ||
| 8036 | 9년 전 | 498 | ||
| 8035 | 9년 전 | 442 | ||
| 8034 | 9년 전 | 398 | ||
| 8033 | 9년 전 | 358 | ||
| 8032 | 9년 전 | 456 | ||
| 8031 | 9년 전 | 360 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기