I am to find all files that start with certailcertain char , e.g
find . -maxdepth 1 \( -name "^m*" -a ! -name "g$" \) -print
but what if someone createcreated file that has special characters in the name of that file? for example
touch "
marst"
this wontwon't be found altoughtalthough it meets the crietrias , howcriteria. How should iI alter the code in order it to find even files whichs startswhich start with a space ?
Also \( -name "^m*" -a ! -name "g$" \) will not work bcsbecause files in find are not "marr" but "./marr" which means this would find nothing , how. How to alter the code to match the start of the word too?