I/O redirection using dup() system call

What is a dup() system call. dup() system call in unix systems copies a file descriptor into the first free slot in the private file descriptor table and then returns the new file descriptor to the user. It works for all the file types. The