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.
Not necessarily a newbie, but this question may sound like it. I am running Slack 10.2/XFCE4 (recently reloaded from scratch). Anyway, while trying to bring the system back to it's pre-rebuild state, I was trying to add my crontab entries back. When I do 'crontab -e' and add a line, it will not save. Instead of the changes being reflected in the '/var/spool/cron/crontabs' directory, they seem to be going to the '/var/spool/cron/' directory <see below>
OK, I thing I figured it out. After searching days on Google, it would figure that once I posted a question I would find the answer just minutes afterwards. The answer.... if I exit the editor with 'ZZ' or ':w!' hte changes would not be saved. However if I exit with ':wq', the file save correctly and can be viewed with 'crontab -l'. Has this alsways been the case? I do not recall having this issue in the past...
That only lists the crontab, does not open up to edit it.
:w! should write to the file with no problems. You would then use :q! to quit. Shift+ZZ should do basically the same thing, save and exit. :wq! is just a combo of write then quit. If it only works with the wq! combo, then somethings seriously wrong with your editor, which is actually elvis on Slackware since vi is actually never installed and elvis is a clone of it.
Sorry for taking so long to reply (had long night). Anyway..... When I rebuily my system is removed the symbolic between vi ->elvis and made a new one vi->vim. After testing again, I have found that the :wq! does not consistently work. Strange still nothing..... If I do a 'crontab -e', it will never save the changes. The changes are still being saved in the base '/var/spool/cron' directories instead of the '/var/spool/cron/crontabs/<username>' file. Could it be that I changed the vi link from elvis to vim. I would not think it would be te cause, since I us vi(vim) 1000's time a day.
hmmmmmm......strange..... I just went back and deleted my link from vi -> vim and replaced it with 'ln -s /usr/bin/elvis /usr/bin/vi'. Now it works when I do 'crontab -e'.... the changes are saved... why would that matter????
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.