Got it, many thanks.. -- Nowarez Market
Nov 23, 2023 15:23:26 Omar Polo <o...@omarpolo.com>: > On 2023/11/23 14:18:22 +0100, Nowarez Market <my2...@has.im> wrote: >> >> >> Yesterday I was playing around some software and at a the certain >> point in time I launched in the shell: >> >> wiz# rm -Rf * >> ksh: rm: wrong param -3 > > it's quite obvious when you know, yet maybe obscure the first time you > run into it. > > The shell expands * to the list of matching files (i.e. all the files > in the current directory) and pass them to rm(1). Now, what happens if > you have a file called '-3'? (or any file whose first character is a > minus sign) > > it runs `rm -Rf -3 ...other files...' and then rm thinks -3 is an > option. > > This is a "common" issue with globbing, and in fact almost all programs > understand "--" to separate flags from files.