Inhaltsverzeichnis

Ausgabe umleiten (redirect)

stdout zu File

ls > /tmp/ls.txt

stderr zu File

sudo -u anyuser mkdir /root/hallo 2> /tmp/err.txt

stdout zu stderr

ls 1>&2 

stderr zu stdout

ls 2>&1

stdout und stderr zu File

touch /root/test_rm.txt
touch /tmp/test_rm.txt
chown anyuser:anyuser /tmp/test_rm.txt
su anyuser
rm -f $(find / -iname "test_rm.txt") &> /tmp/allOut.txt