Forrest logo
back to the nm tool

nm:tldr:e33a3

nm: List all symbols, even debugging symbols.
$ nm -a ${filename-o}
try on your machine

The given command is an example of how to use the nm command with an option -a and a filename passed as an argument.

Explanation:

  • nm: It is a command-line utility available in Unix and Unix-like systems, used for listing symbols from object files or executable files.
  • -a: It is an option that instructs the nm command to display all symbols including local (static) symbols, rather than just the external symbols.
  • ${filename-o}: This part of the command is a shell variable substitution, where filename is the name of the variable being substituted and -o is the default value if the variable is not defined.

In summary, the command nm -a ${filename-o} indicates to the nm command to display all symbols from the object file or executable specified by the variable filename. If filename is not defined, it will default to -o.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the nm tool