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!
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.
Hi,
I am using Fc4.Whenever i edit a file a backup file is created with name filename~.For example if i edit named.conf a file named.conf~ is also created.how to remove this backup by default?
DON'T!!--This is a feature of *nix systems that will save your life one day. It is not that difficult to periodically go into a directory and type: rm *~
If you insist, at least some editors--Gedit, for example--will allow you to turn off this feature. HOW might take some digging.
I don't think there is any system-wide way of doing it---i.e. it depends on the editor.
put it in your crontab (or, if you're daring, root's crontab). You may also wish to just say "find -name '*~' -atime 30" (without the xargs bit) to recieve a mail naming all the files (and then deleting them yourself).
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790
Rep:
Some text editors create a backup file as a safety feature which some (OK many) consider this to be a good thing. Some save the backup file directly to the media, some do not. Your choice of text editor makes a difference, for example try using nedit instead of whatever editor you are currently using.
FYI: some backup files are [re]created by default (even if you have deleted them) at boottime and this is a good thing.
Instead of creating the backup as filename~ i want them to be created as hidden files.for ex: .filename~ becuase it really becomes difficult when you use tab completion.please let me know how to change the backup filename format.
Instead of creating the backup as filename~ i want them to be created as hidden files.for ex: .filename~ becuase it really becomes difficult when you use tab completion.please let me know how to change the backup filename format.
I think the advice so far is that this is a function of the editor. Gedit does not have this feature (AFAIK). What editor are you using? Have you looked at its preferences to see if it will do what you want?
You can put set nobackup in your ~/.vimrc file, but a better solution is to just delete the backups periodically as has already been suggested. If you set vim to no backups, you should have something else doing backups for you (running out of cron so you don't have to remember it).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.