Why is it that when I run programs for the first time it creates a copy of that file with a ~ at the end? For example, a file like HelloWorld.lua when run would create 2 files: HelloWorld.lua and HelloWorld.lua~. What is the purpose of this happening?
Why do compiled programs create a copy with ~?
ubuntu;files;filenames
If file foo has a sibling foo~ the file with a tilde is likely a by-product, backup, or intermediate file for either your compiler or editor.They're usually cleaned up automatically, ignored by your version control, and hidden in guis.Thinks of it as one of those things that most people aren't familiar with and you probably don't want to deal with, unless you're certain you need it — kinda like toupees and colostomy bags.