"/etc/crontab" 및 "/etc/cron.d/" 아래의 파일을 편집하는 방법은 무엇입니까?

"/etc/crontab" 및 "/etc/cron.d/" 아래의 파일을 편집하는 방법은 무엇입니까?

/etc/crontab

# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

crontab을 사용하여 사용자 정의 crontab 파일을 편집할 수 있지만 파일을 편집하거나 다운로드하는 /var/spool/cron/crontabs/데 동일한 방법을 사용할 수는 없습니다 . 편집해야 합니까? 그렇다면 어떻게? 감사해요./etc/crontab/etc/cron.d/

답변1

좋아하는 편집기를 사용하세요. nano그리고 vim훌륭한 편집자입니다. 필드 6은 항목이 실행되어야 하는 사용자 이름입니다.

편집하다:

BSD 4.2 상자가 있습니다. crontab 파일을 편집하기 전에 편집기를 내보내야 합니다.

EDITOR=vi
export EDITOR
crontab -e

관련 정보