How to redirect standard error to a file?

Answer Posted / linuxdemon

2> filename

eg: dat 2> errfilename

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is unix command?

691


What is grep r?

683


What is the significance of the 'tee' command?

674


Write a command to display a file’s contents in various formats?

715


Describe the zip/unzip command using gzip.

710






Why is shebang used?

687


Why is it called a shebang?

680


How do I search for a file in unix command?

636


What is sed awk grep?

688


How do I open a port?

666


Which command should you use to find the remaining disk space in unix server?

834


What are the general commands in using unix os for a beginner?

683


What is updatedb?

680


When i run a programm of orphan process. Instead of getting child's parent (ppid)=1 ..i get 1400 and it varies as per system. How can i findthe right soluion??? My pgm: #include # include int main() { int pid; pid=fork(); if(pid < 0) {exit(-1);} else if(pid==0) { printf("Child Process is Sleeping ..."); sleep(10); printf("Orphan Child's Parent ID : %u ",getppid()); } else { printf("Parent Process Completed ... %u ",getpid()); exit(0); } return 0; } Output:

1851


What is the size of time_t?

763