SiNgAuTaRa - Live with EMC # NetApp # Solaris # Linux # UNIX

December 20, 2005

How to restore crontab file

Filed under: general

today working was teribble, i was log in at one solaris unix box. i was at [/]. tah maciam mana i tertaip ‘crontab -r’. abihhh punah semua terdelete. then i do ‘crontab -l’, it was not there, alamakkkk, what to do, arghhhhh uhhhh ahhhh ihhh uhhhhh..hehe

i wanna to tell my boss but afraid maaa, then i start thinks what to do. i telnet to another unix box, then i do ‘crontab -l’, it was there and same like the previous unix box that i deleted…..
ahhHHHhhHHhh..lega. i try restore back the scripts using vi.

here the location file :

#var/spool/cron/root/crontabs
# vi root

-restore and save

here some info regarding crontab, it might useful for u guys…..hehe

export EDITOR=vi ;to specify a editor to open crontab file.

crontab -e Edit your crontab file, or create one if it doesn’t already exist.
crontab -l Display your crontab file.
crontab -r Remove your crontab file.
crontab -v Display the last time you edited your crontab file. (This option is only available on a few systems.)

crontab/cron = jobs scheduling

http://www.adminschoice.com/docs/crontab.htm#Restrictions

Comments »

The URI to TrackBack this entry is: http://singautara.blogsome.com/2005/12/20/how-to-restore-crontab-file/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.

Get free blog up and running in minutes with Blogsome
Theme designed by Gary Rogers