crontab - Linux

This is a discussion on crontab - Linux ; Hi, Can you help me how can I quiet "crontab -l" command and save my changes in its editor? Thanks....

+ Reply to Thread
Results 1 to 8 of 8

Thread: crontab

  1. crontab

    Hi,

    Can you help me how can I quiet "crontab -l" command and save my
    changes in its editor?

    Thanks.


  2. Re: crontab

    Thanks. I knew I can use crontab -e but ow can I save it and exit?
    I did not find any resource on web. I can only use ctrl-z but it
    terminates the editor
    Bill Marcum wrote:
    > On 21 Dec 2006 22:32:03 -0800, suzan.james@gmail.com
    > wrote:
    > >
    > >
    > > Hi,
    > >
    > > Can you help me how can I quiet "crontab -l" command and save my
    > > changes in its editor?
    > >

    > crontab -e
    >
    >
    > --
    > Help stamp out and abolish redundancy and repetition.



  3. Re: crontab

    Hello,

    suzan.james@gmail.com wrote:

    > Thanks. I knew I can use crontab -e but ow can I save it and exit?
    > I did not find any resource on web. I can only use ctrl-z but it
    > terminates the editor


    The question is, what editor is used, it seems like vi or more likely
    vim, which is the default. Most newbies run into the famous vi
    textadventure with the simple task to exit it cleanly. ctrl-z does not
    quit it, but suspend. At least this returns the console back to you.

    Then the question is, whether you have been able to edit anything at
    all. Most people manage to change the text in their first vi session,
    but they don't know what they did to produce anything, just at some
    time it starts editing somehow.

    And then comes the final problem, saving and exiting, a four! key
    sequence <:> . See the manuals.

    If you are sticking to the text console, you have basically two chances,
    first learn vi, which provides you with a powerful editor which is
    available on about every single 'nixoid system, or second you change
    your environment variable EDITOR or VISUAL to use some other editor
    with crontab -e. You have to learn some key combinations for using any
    editor in the console.

    There are GUI applications nowadays replacing crontab, e.g. kcron for
    KDE, this might save you most of the fuzz.

    Bernd Strieder


  4. Re: crontab

    On a sunny day (22 Dec 2006 02:14:02 -0800) it happened
    "suzan.james@gmail.com" wrote in
    <1166782442.156883.98590@48g2000cwx.googlegroups.co m>:

    >Thanks. I knew I can use crontab -e but ow can I save it and exit?
    >I did not find any resource on web. I can only use ctrl-z but it
    >terminates the editor


    Just as root use:

    crontab -l > myconfig

    Then use any editor to edit 'myconfig'.

    (I use joe as editor, vi sucks, joe is a full screen editor).



    then reload crontab:
    crontab myconfig

    Now you can put myconfig wherever it is _you_ like by specifying the full path.



    LOL
    Works for me :-)


  5. Re: crontab

    Jan Panteltje wrote:
    > Just as root use:
    >
    > crontab -l > myconfig


    Why "as root"? Perhaps he's editing his own (user's) crontab.

    > Then use any editor to edit 'myconfig'.
    >
    > (I use joe as editor, vi sucks, joe is a full screen editor).
    >


    LOL


    Few things about Vi:

    - some distros have elVIs instead of VIm

    - Vi has two modes: command and edit
    - when you run it, it's in command mode:
    - press A to append text or I to insert
    - press ESC to leave edit mode and go back to command mode
    - in command mode: press "x" to delete a character
    - to delete line, press "d" key twice
    - in command mode type :w and hit Enter to save
    - :q to exit
    - :q! to exit even if you made changes
    - :wq to save and exit

    That should be enough for beginners who don't want to learn Vi, but need
    to use it few times in their life.

    --
    Milan Babuskov
    http://njam.sourceforge.net
    http://swoes.blogspot.com

  6. Re: crontab

    Jan Panteltje wrote:

    >On a sunny day (22 Dec 2006 02:14:02 -0800) it happened
    >"suzan.james@gmail.com" wrote in
    ><1166782442.156883.98590@48g2000cwx.googlegroups.co m>:
    >
    >>Thanks. I knew I can use crontab -e but ow can I save it and exit?
    >>I did not find any resource on web. I can only use ctrl-z but it
    >>terminates the editor

    >
    >Just as root use:
    >
    >crontab -l > myconfig
    >
    >Then use any editor to edit 'myconfig'.
    >
    >(I use joe as editor, vi sucks, joe is a full screen editor).
    >
    >
    >
    >then reload crontab:
    >crontab myconfig
    >
    >Now you can put myconfig wherever it is _you_ like by specifying the full path.
    >
    >
    >
    >LOL
    >Works for me :-)


    No flames ... this works for me as well ... for a very long time.


    --
    Posted via a free Usenet account from http://www.teranews.com


  7. Re: crontab

    Milan Babuskov writes:

    [...]

    > Few things about Vi:
    >
    > - some distros have elVIs instead of VIm


    .... some people use nvi instead vi mashed ...

    [...]

    > That should be enough for beginners who don't want to learn Vi,


    It is generally a good idea to be able to get work done without
    relying on custom or customized software[*]. Therefore, it is sensible
    to learn enough vi to be able to use it w/o major difficulties.
    [*] This is a practical experience that dates back to RedHat
    2.0, when I was fairly new to Linux. The first thing I did was
    - of course - customize everything that could be
    customized. For instance, I had an Emacs setup that mapped
    most of the necessary commands to use it to PC function key
    combinations. Then, someday, I found myself logged into an
    AIX system and was almost unable to do anything for half a
    week or so, while learning the default keybindings ...

  8. Re: crontab

    On 2006-12-22, Jan Panteltje wrote:
    > On a sunny day (22 Dec 2006 02:14:02 -0800) it happened
    > "suzan.james@gmail.com" wrote in
    ><1166782442.156883.98590@48g2000cwx.googlegroups.co m>:
    >
    >>Thanks. I knew I can use crontab -e but ow can I save it and exit?
    >>I did not find any resource on web. I can only use ctrl-z but it
    >>terminates the editor

    >
    > Just as root use:
    >
    > crontab -l > myconfig
    >
    > Then use any editor to edit 'myconfig'.
    >
    > (I use joe as editor, vi sucks, joe is a full screen editor).
    >
    >
    >
    > then reload crontab:
    > crontab myconfig
    >
    > Now you can put myconfig wherever it is _you_ like by specifying the full path.
    >
    >
    >
    > LOL
    > Works for me :-)



    you can also do "EDITOR=joe crontab -e"

    or add "export EDITOR=joe" to your .bash_profile file and use "crontab -e"
    (after logging out and back in etc)

    Bye.
    Jasen

+ Reply to Thread