>file
this redirects the output into a file.
but if the out of the line is more then, the extra length will not be visible in the 'file'. so to see the extra lenth of a line in a new line u give
>file 2>&1
ex:-
>file
this is outp
this not av

>file 2>&1
this is outp
ut
this not av
aialbe..


here u can see both the difference ;)

I am not sure what you are really trying to say here
>file means to redirect the standard output to the file
named. 2>&1 means redirect standard error to the file
descriptor of standard out so that error messages go to
the same place, using the same channel as the normal
output. if using 2>&1 gives you more output than a
simple redirect, then the extra outputs are actually error
messages.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.