새소식

인기 검색어

Linux

5/11 스케줄링(crontab ..)

  • -

ifconfig(안되면 ip a)

 

ssh user@192.168.122.118

password: user

 

매월 오후 1시부터 5시까지 10분마다 date명령어를 실행하여 datefile01에 이어쓰기 */10 13-17 * * * date >> datefile01 매년 3월 6월 9월 2번째 화요일 14시 20분에 /etc/passwd 파일의 내용을 userfile에 덮어쓰기 하시오 20 14 8-14 3,6,8 2 cat /etc/passwd > userfile at 또는 cron을 이용 1.3분 뒤에 ps -ef 명령어를 실행해서 psfile01에 저장되도록 설정 2.21년 8월 3일에 date 명령어를 실행해서 메일로 오도록 설정 3.오늘 오후 18시에 cal 명령어를 실행해서 메일로 오도록 설정 4.내일 오후 4시에 ps -ef 명령어를 실행해서 psfile02에 저정하도록 설정 [user@localhost ~]$ at now +3min at> ps -ef > psfile01 at> <EOT> job 3 at Tue May 11 14:06:00 2021 [user@localhost ~]$ at 080321 at> date at> <EOT> job 4 at Tue Aug 3 14:04:00 2021 [user@localhost ~]$ cal 5월 2021 일 월 화 수 목 금 토 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 29 30 31 [user@localhost ~]$ at 18:00 today at> cal at> <EOT> job 5 at Tue May 11 18:00:00 2021 [user@localhost ~]$ at 16:00 tomorrow at> ps -ef at> ps -ef > psfile02 at> <EOT> job 6 at Wed May 12 16:00:00 2021 [user@localhost ~]$ at -l 5 Tue May 11 18:00:00 2021 a user 4 Tue Aug 3 14:04:00 2021 a user 6 Wed May 12 16:00:00 2021 a user [user@localhost ~]$ crontab -e crontab: installing new crontab [user@localhost ~]$ crontab -l 57 13 * * * touch ~/filecron */10 13-17 * * * date >> datefile01 20 14 8-14 3,6,9 2 cat /etc/passwd > userfile [user@localhost ~]$ cat /usr/lib/tmpfiles.d/tmp.conf # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # See tmpfiles.d(5) for details # Clear tmp directories separately, to make them easier to override v /tmp 1777 root root 10d v /var/tmp 1777 root root 30d # Exclude namespace mountpoints created with PrivateTmp=yes x /tmp/systemd-private-%b-* X /tmp/systemd-private-%b-*/tmp x /var/tmp/systemd-private-%b-* X /var/tmp/systemd-private-%b-*/tmp [user@localhost ~]$
Contents

포스팅 주소를 복사했습니다

이 글이 도움이 되었다면 공감 부탁드립니다.