Home > OS >  Questions about the shell find file
Questions about the shell find file

Time:09-21

Only know the test. TXT the front part of the path, don't know the path in detail, such as a/a/b/c/... /test. TXT, how to use the shell judgment test. TXT is there?

thank you

CodePudding user response:

The find/a/b/c/- name test. TXT

CodePudding user response:

Thank you, so you can look up to the test. The TXT path, but to tell if the file exists, to what kind of instruction?

CodePudding user response:

Find no means there is no

CodePudding user response:

Just try and find whether have found, the return value is 0.
So use & gt; The find results lead to the log file, and then use the grep judgment is ok.
  • Related