I think you want to use a feature of the shell, not of
ls. I use bash, so I checked for what you want in
man bash. Search for "^EXPANSION", (by first pressing '/'). Excerpt:
Expansion is performed on the command line after it has been split into words. There are seven kinds of expansion
performed: brace expansion, tilde expansion, parameter and variable expansion, command substitution, arithmetic
expansion, word splitting, and pathname expansion.
... < snip > ...
After word splitting, unless the -f option has been set, bash scans each word for the characters
[. If one
of these characters appears, then the word is regarded as a pattern, and replaced with an alphabetically sorted list
of file names matching the pattern. …
I've recently started excluding files based on their first letter, with a command like:
$ ls ./[^t]*
This would match anything that doesn't start with the letter
t. If you add more characters between the brackets, then you exclude files starting with those letters too.
Looking for a link, and I've a good one! See Pattern Matching. From there, this would work for your case:
$ ls -lrt ./!(temp_log.*)
This requires that the
extglob shell option is enabled
shopt builtin (
shopt -s extglob), as stated by Gilles.