In: Computer Science
Open two windows in Ubuntu, and list the content of the /dev/fd folder. Can you explain the difference observed from the two windows? The name /dev/fd is actually a symbolic link to /proc/self/fd. The name self is also a symbolic link pointing to a number, which is the process ID of the current process. Therefore, the number pointed to by self is different if viewing from different windows.
Now we will understand what is dev/fd
These days systems of ubuntu are comming with a folder in the computer drive namine /dev/fd in them files are named somewhat differently and the files are 0,1,2,etc. now if we are opening a file in this folder it means we are duplicating discriptors. now, these files holds the pointing value of the current process as mentioned in the question description. so if we open dev/fd in seperate 2 windows it will show you the different files as these files are pointing to the currently running processes.now the question arises that what is the file descriptor in unix or ubuntu systems a file discriptor is a pointer/indicator used to access a file ,resource,a process and much more it is similar to the shortcuts in a windows based systems. now below i have provided you with the related screenshots to the question