All working notes

Start with the directory

A filename does not always tell you where a file is. The missing piece is often the directory from which a program is looking.

Ask the shell where it is

Before searching the whole machine, start with the current working directory. A command such as cat settings.conf asks for a file relative to that directory, not necessarily relative to the script you are reading or the application you are trying to understand.

pwd
pwd -P
ls -ld -- . ..

The first command reports the shell's working directory. In shells that track a logical path through symbolic links, that can differ from the physical path printed by pwd -P. Neither result is automatically wrong: they answer slightly different questions. The last command describes the current directory and its parent without listing their contents.

Separate a name from its destination

A symbolic link gives something another name. That is useful, but it adds a step between the path you type and the file a program eventually opens. For an existing file on a GNU system, realpath can make the resolved path explicit:

realpath -- ./settings.conf
ls -l -- ./settings.conf

These commands inspect a path; they do not edit the file. Missing files, inaccessible parent directories, and links to missing destinations are different cases. Read the error rather than treating every failure as “the file is gone.” Options differ between implementations, so consult the tools installed on the machine you are using.

Remember whose directory matters

Your terminal is only one process. A service started by a service manager can have a different working directory, a different user, and a different environment. Successfully opening a relative path in an interactive shell does not prove that a service can open the same string.

When investigating a service, inspect its configuration and execution context. Keep the distinction between a configuration file's own location and the directory used to resolve paths inside it. Applications do not all use the same convention, and a service manager cannot choose that convention on their behalf.

Make the next observation smaller

Once you know the directory and the resolved destination, inspect the particular file you meant. Avoid starting with a recursive search that produces hundreds of unrelated matches. A short answer is easier to compare with what the application actually reports.

The useful habit is not memorising one command. It is making the implied context visible: which process, which directory, which path, and which file. That gives the next question somewhere solid to start.