LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-08-2011, 07:30 AM   #1
niharikaananth
Member
 
Registered: Aug 2011
Posts: 58

Rep: Reputation: Disabled
crontab


Hi....when I type "crontab -e" to edit the file, it is not opening in the editor & showing output as "285". I just wanted to edit crontab, So could anybody please tell me which is the real file of crontab, so I can manually edit that file using vi editor or nano. Or if that default editor is corrupted when I type "crontab -e", how can I change default editor before using "crontab -e" command. I will be waiting for your kind reply.

Regards
Niharika
 
Old 08-08-2011, 07:42 AM   #2
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
man crontab:
Quote:
Generally the -e option is used to edit your crontab. crontab will use the editor specified by your EDITOR or VISUAL environment variable (or /usr/bin/vi) to edit the crontab.
 
Old 08-08-2011, 09:23 AM   #3
nkd
Member
 
Registered: Oct 2006
Location: india
Distribution: fedora 8, ubuntu 10.10
Posts: 315

Rep: Reputation: 34
hi,

On my system (ubuntu 10.10) the crontab -e opens up a menu to choose the shell from and it works fine.
By the way, I hope you understand what the command does ?!
Quote:
It creates a crontab file for the user in the /var/spool/cron/crontabs/ folder and the file has the name of the user
The main or system level crontab file is the /etc/crontab file. So you may directly edit it using gedit or vi or nano or emacs. Warning :- Do this only if you know what you are upto.

If you are trying to create and execute a script to do a cron job :-
Quote:
In the /etc directory you will probably find some sub directories called
'cron.hourly', 'cron.daily', 'cron.weekly' and 'cron.monthly'.It will be run either hourly, daily,
weekly or monthly, depending on the name of the directory.
Plz check out this nice link.

Hope it helped
bye
nishith
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux crontab vs unix crontab ytd Linux - General 2 08-09-2009 05:07 AM
replaced crontab, now should get crontab back to what it was raminn Linux - Newbie 2 10-20-2008 07:15 PM
man crontab(5) vs crontab(1) Canis Polaris Linux - Newbie 2 06-04-2008 04:03 PM
using crontab jkeertir Linux - Newbie 3 04-23-2008 06:41 PM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM


All times are GMT -5. The time now is 07:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration