Linux - NewbieThis 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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
GNU/Linux kernel 2.6, Slackware.
VIM - Vi IMproved 7.1
Huge version without GUI.
When I quit an editing sesion vim creates a backup file with the same name as that of the edited file but with a '~' appended. I would like the name for the backup file to be the following: same base name as that of the edited file and edited file extension replaced by 'bak'. Example:
Input file//////////////backup file after editing
The first line corresponds to what vim now does. The second one is what I want vim to do. If someone could give me a hint I would greatly appreciate it. Regards,
Are you sure it does that? IME, it only creates the backup for the duration of the edit session, then removes it on successful exit or quit.
The only time I've seen the file still there afterwards is if I've crashed out of the editor for some reason... that's how it recovers your prev session.
Not any editor. dbEdit under MS-DOS replaces the extension with .bak as the name of the backup file. And this backup is permanent, not temporary. And I want vim to behave, in this respect, as dbEdit.
Thanks for your replies.
This is not MS-DOS. Things do act differently. I have not seen a Linux Editor that doesn't add ~ at the end of the session files. If you want an editor that works like dbEdit, then use dbEdit. Unfortunately in Linux the convention is to end the file with ~ and not .bak. MS-DOS requires a file extention, Linux does not. I don't think you will find a native Linux editor that will save those files as .bak, but best of luck to you in your search.
Thanks a lot. Then, unfortunately, I'm doomed to have three files coexisting. Even worst: if I order windows/dos to delete all *~ it seems not to see them. It lists them when I issue the dir command but 'del *~' does nothing. Well. Good bye and best wishes.