find in directory that starts with dash
find interprets a dash at the start of a filename as the start of an option. Using the familiar -- trick doesn't work since options are after the filename, quoting has no effect, and replacing the first dash with \- doesn't work either. Users are often encouraged to precede such filenames with ./ , but what can I do if I don't know whether the given path will be absolute or relative? Edit: One solution is to find "$(readlink -f -- "$test_filename")" , but it's ugly. Any better ideas? Edit 2 : Thanks for the suggestions. Here are the two scripts that resulted from this effort: safe-find.sh ;