How can I search a file by its name and partial path?
Problem
Often I have a file name and it's partial path, e.g. "content/docs/file.xml". Is there a simple way to search for that file, without manually cutting into parts its name to provide directory name and file name separately? It'd be great if worked in that way, so I could run , but unfortunately it doesn't.
Error Output
find
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix for: How can I search a file by its name and partial path?
Pass in a wildcard to indicate a match for anything. You also need to escape the s, e.g.: or enclose the pattern in quotes, e.g.: As the man page describes it: $ find . -name *.c -print find: paths must precede expression This happens because *.c has been expanded by the shell resulting in find actually receiving a command line like this: find . -name bigram.c code.c frcode.c locate.c -print That command is of course not going to work. Instead of doing things this way, you should enclose the pa…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix