title: The go language exec.Command method execute failed
body: <pre><code>package main
  
  import (
      "os/exec"
      "fmt"
  )
  
  func main(){
      cmd := exec.Command("find", "/home/d101270c/cbe", "-name","*.log", "&gt;", "log.txt")
      fmt.Println(cmd)
      err := cmd.Run()
      if err != nil {
          fmt.Printf("%s\n", err)
          return
      }
  }
  </code></pre>
  
  <p>Run result:</p>
  
  <pre><code>&lt;1067 linux20 [d101270c] :/home/d101270c&gt;uname -a
  Linux linux20 2.6.16.60-0.21-smp #1 SMP Tue May 6 12:41:02 UTC 2008 x86_64 x86_64 x86_64 GNU/Linux
  &lt;1068 linux20 [d101270c] :/home/d101270c&gt;tgo
  &amp;{/usr/bin/find [find /home/d101270c/cbe -name *.log &gt; log.txt] []  &lt;nil&gt; &lt;nil&gt; &lt;nil&gt; [] &lt;nil&gt; &lt;nil&gt; &lt;nil&gt; &lt;nil&gt; false [] [] [] [] &lt;nil&gt;}
  exit status 1
  </code></pre>
  
  <p>This command execute failed, and no <code>log.txt</code> exists.</p>
  
  <p>Why?</p>