I have put the file descriptor 1 to file, using command exec 1>>out.txt
Then I could not see any output on the screen, how could I restore the default output to terminal?
Thanks
Look into the tee command.
First know the file attached to your terminal by issuing the command tty
and then use the same command again to change the file descriptor 1 to the file attached to your terminal
for e.g
[ajaykumarl@ajaykumar abc]$ tty
/dev/pts/6
[ajaykumarl@ajaykumar abc]$ exec
[ajaykumarl@ajaykumar abc]$ exec 1>>out
[ajaykumarl@ajaykumar abc]$ ls
[ajaykumarl@ajaykumar abc]$ exec 1>>/dev/pts/6
[ajaykumarl@ajaykumar abc]$ ls
out test
[ajaykumarl@ajaykumar abc]$
Thanks & Regards
ajay reddy
Cool, thank you very much.