On 2025-10-30 at 13:33, Michael wrote:
The command
ls -- *.pdf
has been run and a very large number of PDF files has been listed.
It is very difficult to spot any strangely named PDF files.
What command should be issued to easily list any strangely named PDF
file ?
Try:
$ ls -- *.pdf | grep ' -'
This should show you any files whose name include a space followed by
a dash. The space would be treated as a token separator, and the dash
would be treated as the beginning of a new argument to ls.
file at the start of a line. grep '--K' is better.