티스토리 뷰
리눅스 종료 명령어
1) 종료
#>poweroff
#>halt
#>init 0
2) 재부팅
#>reboot
3) 예약 종료
#>shutdown <option> <time>
-h halt 종료
-r reboot 재부팅
#>shutdown -h now -> 지금 종료
#>shutdown -h +10 -> 10분후 종료
#>shutdown -r +20 -> 20분후 재부팅
예약작업
1. 단일예약 : at
#>at --help
- 패키지 설치
#>yum install -y at.x86_64
#>systemctl restart atd
1) 작업 설정
#>at now <time( minutes, hours, days, weeks )>
#>at now +3minutes
at> echo "3minutes" ->enter
->ctrl + d 명령 끝
#>at -t <time( MMDDhhmm )>
#>at -t 04052000
ar>echo "hello" ->enter
->ctrl + d
2) 작업 확인
#>atq
#>at -c <작업번호>
3) 작업 삭제
#>atrm <작업번호>
#>atrm 6
2. 반복 예약 : cron
1) /etc/crontab
45 20 5 4 * date >> /root/file.txt
ex) 매주 월요일 오전 10시 00분에 전체 백업을 수행
0 10 * * 1 tar cvfJ /backup/fullbackup.tar.xz -g /backup/backuplist /etc /home
ex) 5월 수요일마다 오후 10시 00분에 증분 백업을 수행
0 22 * * 3 tar cvfJ /backup/inc.tar.xz -g /backup/backuplist /etc .home
ex) 4월 5일 매시 매분마다 date >> /root/file.txt 실행
* * 5 4 * date >> /root/file.txt
2) crontab -e
* * 5 4 * date >> /root/date.txt
- 작업 확인
#>crontab -l
- 작업 삭제
#>crontab -r
/etc/sysconfig/selinux
SELINUX=disabled
#>reboot
'LInux 1' 카테고리의 다른 글
17. 쉘 스크립트 정리 LInux (0) | 2017.04.11 |
---|---|
16. 환경변수 정리 Linux (0) | 2017.04.11 |
15. 특수권한 및 프로세스 정리 (0) | 2017.04.11 |
14. 링크파일 정리 Linux (0) | 2017.04.11 |
13. 검색기능 정리 LInux (0) | 2017.04.11 |