Computing.Net > Forums > Unix > 2>&1 &

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

2>&1 &

Reply to Message Icon

Name: anthony
Date: May 6, 2003 at 18:51:07 Pacific
OS: unix
CPU/Ram: 512
Comment:

What is the different between 2>&1 and 2>&1 &



Sponsored Link
Ads by Google

Response Number 1
Name: Cara
Date: May 7, 2003 at 02:32:19 Pacific
Reply:

The 2>&1 will write standard output and standard errors to a file. While it is processing, the command line will not be available. The shell will wait for the process to complete before letting you enter anything into the command line again.

The 2>&1 & will also write standard output and standard errors to a file. The extra & means to execute the process in the background so the command line is still available while it is processing. You can use an & after almost anything to execute it as a background process.


0

Response Number 2
Name: anthony
Date: May 11, 2003 at 19:48:13 Pacific
Reply:

Cara

thanks a lots

would you mind giving some somment on the following Commands

#1 rsh pc1 /tmp/test >>/tmp/test.log 2>&1 &

#2 rsh pc1 /tmp/test >>/tmp/test.log "2>&1 &"

If i ran #1 , it failed,
if i ran #2 , it success

thanks!!!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Bourne shell error if/the... Reboot question



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: 2>&1 &

NEEDED CRYSTAL LAN DRIVER FOR SUN OS 2.5.1 www.computing.net/answers/unix/needed-crystal-lan-driver-for-sun-os-251/68.html

ISO 9660 with AIX 4.1 and 4.2 - Cannot Read CDR's www.computing.net/answers/unix/iso-9660-with-aix-41-and-42-cannot-read-cdrs/544.html

gcc 2.8.1 problem www.computing.net/answers/unix/gcc-281-problem/155.html