I used the grep K option to find the PDF file which had a leading hyphen
and a K in the filename.

I then used the double dash (--) in the rm command to delete the K file.

I also used the double dash in the ls command to search for other possible
files with a leading hyphen in their name.

Thanks to all who helped me.


On Thu, Oct 30, 2025, 6:53 PM Nicolas George <[email protected]> wrote:

> alain williams (HE12025-10-30):
> > However: in this case the filename expansion (*pdf) is done by the shell
> and so
> > it is the shell which will have sorted the names.
>
> You are starting from a true fact and arriving at a wrong conclusion. It
> is really ls that will decide the sort order here. I suggest you run
> some tests.
>
> > I assume that there is not a directory with name that matches *pdf - in
> which
> > case ls will sort the names in there.
>
> Indeed.
>
> Regards,
>
> --
>   Nicolas George
>
>

Reply via email to