title: using find command in unix to search for a newline
body: <p>I would like to search all .java files which have the newline escape sequence <code>\n</code> (backslash followed by 'n') in the files.</p>
  
  <p>I am using this command:</p>
  
  <pre><code>find . –name "*.java" –print | xargs grep “\n”
  </code></pre>
  
  <p>but the result shows all lines in .java files having the letter <strong>n</strong>. 
  I want to search for a newline <code>\n</code>.</p>
  
  <p>Can you please suggest a solution?</p>
  
  <p>Example:</p>
  
  <pre><code>x.java
  method abc{
  String msg="\n Action not allowed.";}
  
  y. java
  method getMsg(){
  String errMsg = "\n get is not allowed.";}
  </code></pre>
  
  <hr>
  
  <p>I want to search all *.java files having these type of strings defined with newline escape sequence.</p>