LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-19-2005, 08:08 PM   #1
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Vim leaves temp files everywhere


Whenever I've edited a file with Vim I am left with a file such as 'filename~' which I have to rm manually.

Anyone know if theres an option to stop making these temp files? I look in my vimrc but didn't see anything relevant.
 
Old 11-20-2005, 05:05 AM   #2
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
set nobackup
 
Old 11-20-2005, 05:16 AM   #3
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Original Poster
Rep: Reputation: Disabled
Thanks will do that
 
Old 11-20-2005, 03:57 PM   #4
Widgeteye
Member
 
Registered: Mar 2005
Posts: 130

Rep: Reputation: 17
Re: Vim leaves temp files everywhere

Quote:
Originally posted by dive
Whenever I've edited a file with Vim I am left with a file such as 'filename~' which I have to rm manually.

Anyone know if theres an option to stop making these temp files? I look in my vimrc but didn't see anything relevant.
They're not temp files they are backup files of the original file. If you turn that off you will have no backup of the original file and if you screw it up and can't remember exactly what was in it before you started your editing of the file YOU are screwed.

I advise against this. You can always remove them after you're done with your edit.
But it's up to you as always.
 
Old 11-20-2005, 06:04 PM   #5
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
Using rm for every single file is annoying, and it is easy to delete both accidentally.
 
Old 11-20-2005, 06:50 PM   #6
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Original Poster
Rep: Reputation: Disabled
I find it easier to make backups manualy of the important files than to keep rm'ing files afterward
 
Old 11-21-2005, 06:34 AM   #7
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Rep: Reputation: 35
the *~ are a p.. in the a..

jed leaves a lot of them too
 
Old 11-21-2005, 12:22 PM   #8
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
Well, you could setup a cron job with this:
Code:
find / -name *~ -exec rm {} \;
and the problem is gone
You could add a parameter to find to erase only files that weren't accessed in X days.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
yum temp files? TranceDude Linux - Software 1 09-25-2005 04:35 AM
Mandrake 10.x - Gvim 'split open' corrupts opened files and leaves ghost swapfiles Xolo Linux - Software 0 05-23-2005 05:24 AM
Wine Temp Files? Garibaldi3489 Slackware 1 01-09-2005 11:26 AM
defrag/temp files mindseye Linux - Newbie 1 01-18-2004 11:28 AM
temp files Daggelicious Linux - Newbie 2 08-21-2003 10:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration