Re: The ls command
On 2025-10-31 04:53:31 +0000, David wrote:
> This is a good example of how the shell can be your friend if you
> understand some basics of how to use it. We dont even need 'ls'. The shell
> can show the filename that caused the original error message without
> needing any help from other utilities like 'ls' or 'grep'.
>
> Demo:
>
> $ >--Fexample # create a file named --Fexample
> $ echo --F* # use builtin shell pathname expansion to
> --Fexample # show matching filenames
But that's potentially insecure as this could yield arbitrary
escape sequences to the terminal, which could do bad things.
Note: In the OP's case, the filenames apparently code from an
untrusted source.
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)
Reply to: