「/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

おすすめ記事