Another mechanism or component programs and scripts often use is called a lock file. It's usually temporary (it resides in /tmp
) and is sometimes used when multiple entities rely on a single source of data or need to know that other programs exist. Sometimes, it's merely the presence of a file, a particular timestamp on a file, or another simple artifact.
There are several ways to test for the existence of a file, but one important attribute that has not been demonstrated or explored is the concept of a hidden file. A hidden file in Linux is not really hidden (like in Windows), but it is not usually apparently unless a particular flag or command is ran. For example, the ls
command does not return hidden files among the results, but the ls
command with the -a
flag will (-a
for all).
Note
Most file explorers have hidden files that aren't visible by default. In Ubuntu, Ctrl + H inside of the file explorer toggles this feature.
To create a hidden...