Anis ELLEUCH wrote: > I would like to ask if it is possible to disable expanding asterisk when it > selects all entries ?
You ask if it is possible and the answer is no it is not possible. Because the shell expands the "*" before it passes the result as arguments to the rm command. The rm command has no idea it was the result of an expansion from a "*" wildcard. The rm command simply receives the list of files. > Another idea: `*` and `/*` should not be interpreted and the user has to > enter another sequence "more powerful" to emphasize selecting all entries ( > `^*` would it work just fine ?) But then the same thing exists there. If the user accidentally enters that sequence then it is the same thing all over again. If I am ever uncertain about a file glob expansion then I use echo first to see what the expansion will do. If dealing with dangerous commands such as rm then it is wise to check twice before invoking. echo rm * .jpg If you saw the result then you would fix it before invoking the command for effect. If the result is bad then correct it. If the result is good then remove the echo and run the command for effect. Bob