You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The most obvious answer to this challenge is grep -l 500 *, however, this is a bad practice as it will not handle files named beginning with a hyphen. Please see https://www.defensecode.com/public/DefenseCode_Unix_WildCards_Gone_Wild.txt for examples of how the naked wildcard * can be exploited in various ways.
The correct, best practice answer to the challenge is either grep -l 500 -- * or grep -lR 500 . or grep -l 500 ./*. The latter two answers produce a list of all the appropriate files, but each is prefixed with ./, so the challenge currently doesn't accept these as solutions.
I think the criteria should be modified to allow ./ as a prefix to all files.
The text was updated successfully, but these errors were encountered:
Regarding challenge: https://cmdchallenge.com/#/search_for_files_by_extension
The most obvious answer to this challenge is
grep -l 500 *
, however, this is a bad practice as it will not handle files named beginning with a hyphen. Please see https://www.defensecode.com/public/DefenseCode_Unix_WildCards_Gone_Wild.txt for examples of how the naked wildcard*
can be exploited in various ways.The correct, best practice answer to the challenge is either
grep -l 500 -- *
orgrep -lR 500 .
orgrep -l 500 ./*
. The latter two answers produce a list of all the appropriate files, but each is prefixed with./
, so the challenge currently doesn't accept these as solutions.I think the criteria should be modified to allow
./
as a prefix to all files.The text was updated successfully, but these errors were encountered: