|
|
Log in / Subscribe / Register

/tmp and /var/tmp

/tmp and /var/tmp

Posted Mar 30, 2011 20:59 UTC (Wed) by nix (subscriber, #2304)
In reply to: /tmp and /var/tmp by dmarti
Parent article: Introducing /run

Original vi / nvi puts files in there for use by virecover. You really want those to still be there after e.g. a power cut.

(TBH I much prefer this over the vim habit of scattering .swp files everywhere. Emacs has a similar feature: you can drop all autosave files into a single directory without much effort.)


to post comments

/tmp and /var/tmp

Posted Mar 30, 2011 21:18 UTC (Wed) by cortana (subscriber, #24596) [Link] (2 responses)

And for those who are wondering, you can set vim's 'directory' option to '/var/tmp' to get this behaviour back.

/tmp and /var/tmp

Posted Apr 1, 2011 17:28 UTC (Fri) by nix (subscriber, #2304) [Link] (1 responses)

Oo, thanks, hadn't noticed that. It doesn't record the pathname anywhere, though, so collisions are quite likely. (Emacs and XEmacs encode the pathname in the autosave filename.)

/tmp and /var/tmp

Posted Apr 1, 2011 19:13 UTC (Fri) by dtlin (subscriber, #36537) [Link]

:h dir
	- For Unix and Win32, if a directory ends in two path separators "//"
	  or "\\", the swap file name will be built from the complete path to
	  the file with all path separators substituted to percent '%' signs.
	  This will ensure file name uniqueness in the preserve directory.
(Same with 'bdir'.)

/tmp and /var/tmp

Posted Mar 31, 2011 12:38 UTC (Thu) by NAR (subscriber, #1313) [Link]

On the other hand if I edit a file on NFS from one computer, then vim can't use the /var/tmp from an other computer...


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds