[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: the ~ files



*- On 24 Apr, homega@vlc.servicom.es wrote about "Re: the ~ files"
> Khalid EZZARAOUI dixit:
> ~> 
> ~> I would like to know if it is possible to delete all file ending by the
> ~> symbol ~
> ~> with the command without risk :
> ~>         rm -R *~
> ~> I have more and more of them every day.
> 
> I guess it is (just guess).  If you use vim you can tell the editor not
> to do any backup files (.vimrc).
> 
> Horacio

Or if you are using (x)emacs you get these as well.  I have the
following in my .emacs file, it puts all the ~ backup files in one
directory and thus can easily be managed.  Of course it doesn't help
for files of the same name in different directories.

(defun make-backup-file-name (file)
  (concat "/home/servis/Emacs_Bak/" (file-name-nondirectory file) "~"))
;         ^^^^^^^^^^^^^^^^^^^^^^^^
;         change to your own preference
(defun backup-file-name-p (file)
  (string-match "\\~$" file))


-- 
Brian 
---------------------------------------------------------------------
"Never criticize anybody until you have walked a mile in their shoes,  
 because by that time you will be a mile away and have their shoes." 
							   - unknown  

Mechanical Engineering                                bservis@usa.net
Purdue University                   http://www.ecn.purdue.edu/~servis
---------------------------------------------------------------------


Reply to: