[index] [text page] [<<start] [<prev] [next>] [last>>]
Page 43: Redirecting Output (adv)

Page 43

  
  Redirecting Output (adv)
      $ touch -t 200401211152 /tmp/ts
      $ find / -newer /tmp/ts -print  2>err.txt >youngfiles
  You can actually redirect any file descriptor to any other.
  Redirect stderr to stdout:
      $ find private/* public/* 2>&1 | more
      ....
  "Swap" stderr and stdout:
      $ find private/* public/* 3>&2 2>&1 1>&3 3>&- | more
      ....

Copyright 2005, Bri Hatch of Onsight, Inc.

Presented at LFNW - LinuxFest Northwest, Bellingham, Washington, Apr 2005

Presentation created using vim and MagicPoint.