Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm posting into general because I'm hoping the solution is not fedora specific.
While I won't go into the brilliance of having a utility that has the "erase w/o warning" option (-r) right next to the commonly used "edit" option (-e) (neighboring keys on a keyboard) I fat finger'd and deleted my crontab for root. (as root entered `crontab -r`)
Looking at the documentation (man crontab), it looks like the cron file that is specific to a user is stored in "/var" which seems contrary to almost all other user-scoped software settings which are stored in the home directory.
I keep backups of my home directories, but according to what I've read, my root's cron file was not backed up. Am I correct here?
2nd question, did I just mess up all of my day-to-day and hour-to-hour tasks that came with my distro? If I remember correctly the file was pretty small, and may have only had one line or two of distro specific stuff. I can redo my additions without too much problems.
If so, can someone send me the orig lines that come with an FC3 install, or tell me where I can find/extract fresh root cron file?
I'm posting into general because I'm hoping the solution is not fedora specific.
While I won't go into the brilliance of having a utility that has the "erase w/o warning" option (-r) right next to the commonly used "edit" option (-e) (neighboring keys on a keyboard) I fat finger'd and deleted my crontab for root. (as root entered `crontab -r`)
The cron shipped with slackware DOESN'T have that option ;}
Quote:
Originally Posted by abrumley
Looking at the documentation (man crontab), it looks like the cron file that is specific to a user is stored in "/var" which seems contrary to almost all other user-scoped software settings which are stored in the home directory.
I keep backups of my home directories, but according to what I've read, my root's cron file was not backed up. Am I correct here?
Nope, crontabs for all users live under /var/spool/cron/ for
pretty much every distro and commercial Unix I've ever come
across ....
Quote:
Originally Posted by abrumley
2nd question, did I just mess up all of my day-to-day and hour-to-hour tasks that came with my distro? If I remember correctly the file was pretty small, and may have only had one line or two of distro specific stuff. I can redo my additions without too much problems.
No, you didn't. Those jobs are defined in /etc/cron.hourly and
so forth ...
Quote:
Originally Posted by abrumley
If so, can someone send me the orig lines that come with an FC3 install, or tell me where I can find/extract fresh root cron file?
Thanks for any help,
Alan
Sorry, I wouldn't touch a RH product by choice, and am in
the blessed position of not having any RH related installs
at work at the moment ;}
Most distros separate the user-level crontabs (even root's) from the system-wide crontab and the cron.{hourly,daily,weekly,monthly} cron dirs. You should be fine if you are able to restore your own cron jobs.
If so, can someone send me the orig lines that come with an FC3 install, or tell me where I can find/extract fresh root cron file?
If cron logging is turned on, you may be able to reconstruct the crontab file you deleted manually. I would expect the log to be in /var/log/cron.log or something similar, if logging is turned on. Check /etc/syslog.conf for logging settings for the cron facility (file could be in a different location for Fedora). Cron logging is off by default on my Debian boxes ... don't know about Fedora however.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.