What is the Linux command to return all files that start with TEMP but do not end with double digits?
I think it should look something like this:
ls -l TEMP*[!0-9][!0-9]
but the results of my search are omitting some results it seems.
With GNU and most modern BSDs
If your shell is
should work. If you want to search recursively and globstar is enabled (
(note that it does not traverse hidden directories by default)
For example, if
The equivalent in
Your idea is okay: looking for everything starting with temp and not ending with two number. Unfortunately, I think you made a syntax mistake. You should replace ! by ^. So now you are searching for files like: temp*99 and temp*!!.