SlackwareThis Forum is for the discussion of Slackware Linux.
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 running slackware64 current. I ran crontab -e and added a script and when I was finished I got this error
Code:
<cron/crontab.3ApGl0" 1L, 46C written
E828: Cannot open undo file for writing: /var/spool/cron/.crontab.
3ApGl0.un~
that happens because you have changed your default /usr/bin/vi link making it point to /usr/bin/vim instead of /usr/bin/elvis: vim, by default, creates backup/undo files of the ones you edit and that confuses crontab, that uses "vi" as default editor.
you can either:
- instruct vim to not create backup/undo files via ~/.vimrc adding these two options to this file
Code:
set nobackup
set noundofile
this is what I personally have chosen because I find those files laying around in the filesystem annoying;
- launch crontab specifying a custom EDITOR variable, like
Is the partition full? I've had similar problems when using crontab or sudoedit when my /var partition is full.
No it's not full.
Quote:
Originally Posted by ponce
hi MarioMaster100, welcome to LQ!
that happens because you have changed your default /usr/bin/vi link making it point to /usr/bin/vim instead of /usr/bin/elvis: vim, by default, creates backup/undo files of the ones you edit and that confuses crontab, that uses "vi" as default editor.
you can either:
- instruct vim to not create backup/undo files via ~/.vimrc adding these two options to this file
Code:
set nobackup
set noundofile
this is what I personally have chosen because I find those files laying around in the filesystem annoying;
- launch crontab specifying a custom EDITOR variable, like
Code:
TERM=linux EDITOR=elvis crontab -e
Yeah I changed it to vim because the default of vi just hangs displaying this message
maybe it wasn't hanged but it wasn't simply displaying anything on screen: that happens also when you got a custom TERM variable and elvis (the default vi) gets confused.
that's why in the example above I suggested you to still try with elvis but using a standard TERM=linux environment variable.
maybe it wasn't hanged but it wasn't simply displaying anything on screen: that happens also when you got a custom TERM variable and elvis (the default vi) gets confused.
that's why in the example above I suggested you to still try with elvis but using a standard TERM=linux environment variable.
Ok, would it still work right with nano though? I didn't get any errors from using it with nano.
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609
Rep:
Quote:
Originally Posted by MarioMaster100
Ok, would it still work right with nano though? I didn't get any errors from using it with nano.
Well anyway, unless you really want to change the link for important reasons it's not a very good practice...
In this case you should overwrite the EDITOR variable (or equivalent), either in your init script, or on the command line:
Code:
# EDITOR=nano crontab -e
PS/ I marked your comment as useful because I slipped when I tried to "Quote" your message, unfortunately I don't know how to undo it... No offence but it was not useful .
Well anyway, unless you really want to change the link for important reasons it's not a very good practice...
In this case you should overwrite the EDITOR variable (or equivalent), either in your init script, or on the command line:
Code:
# EDITOR=nano crontab -e
PS/ I marked your comment as useful because I slipped when I tried to "Quote" your message, unfortunately I don't know how to undo it... No offence but it was not useful .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.