How does a temporary file differs from a pipe? [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite













This question already has an answer here:



  • What is the purpose of using a FIFO vs a temporary file or a pipe?

    1 answer



When one sends data (say stdout) to a temporary file, it is likely that something would be done with that data (the temporary file will be used as stdin for some process), then the temporary file will be deleted.



A pipe is a variant of special files, that can chain together commands; passing output from one program, as the input of another.



Generally, a regular pipe would be destroyed right after the process, but a named pipe (commonly named, and not necessarily 100% accurate, "FIFO"), will keep alive after the process ended, until a certain point.



My question



A temporary file is likely to be deleted after usage and a named pipe isn't, but what is the difference between a temporary file and a pipe in general, or at least, an anonymous pipe?



Update



I was wrong to think that a "temporary file" a special file, it isn't; It is a regular file that just being used differently; I would say that a pipe differs in the sense that it is defined as a special file, and has a single narrow purpose (chaining), while a temporary file might have other usages besides chaining, but, there might be a more "total" way to describe the difference.







share|improve this question














marked as duplicate by Stephen Kitt, Kiwy, George Vasiliou, Christopher, muru Apr 11 at 14:28


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • I swear I fail to see how this a duplicate --- there is no emphasis there, as I recon, to how the two pipes differ from a "temporary file". I believe a few people looked about this in Google.
    – user9303970
    Apr 11 at 10:08











  • Point 2 of the suggested duplicate addresses the differences between pipes and temporary files. It’s just a suggestion though.
    – Stephen Kitt
    Apr 11 at 10:14










  • Perhaps you could clarify what difference you see between a temporary file and a “regular” file...
    – Stephen Kitt
    Apr 11 at 10:15










  • The only total difference I recon is that in general, a "temporary file" has a much shorter life cycle than a "regular file".
    – user9303970
    Apr 11 at 12:00










  • Both are temporary and I want to understand how are they practically different. If FIFOs don't hold data on disk, where do they hold it temporarily when it is being passed through them? On RAM? An answer should define this.
    – user9303970
    Apr 11 at 12:19














up vote
1
down vote

favorite













This question already has an answer here:



  • What is the purpose of using a FIFO vs a temporary file or a pipe?

    1 answer



When one sends data (say stdout) to a temporary file, it is likely that something would be done with that data (the temporary file will be used as stdin for some process), then the temporary file will be deleted.



A pipe is a variant of special files, that can chain together commands; passing output from one program, as the input of another.



Generally, a regular pipe would be destroyed right after the process, but a named pipe (commonly named, and not necessarily 100% accurate, "FIFO"), will keep alive after the process ended, until a certain point.



My question



A temporary file is likely to be deleted after usage and a named pipe isn't, but what is the difference between a temporary file and a pipe in general, or at least, an anonymous pipe?



Update



I was wrong to think that a "temporary file" a special file, it isn't; It is a regular file that just being used differently; I would say that a pipe differs in the sense that it is defined as a special file, and has a single narrow purpose (chaining), while a temporary file might have other usages besides chaining, but, there might be a more "total" way to describe the difference.







share|improve this question














marked as duplicate by Stephen Kitt, Kiwy, George Vasiliou, Christopher, muru Apr 11 at 14:28


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • I swear I fail to see how this a duplicate --- there is no emphasis there, as I recon, to how the two pipes differ from a "temporary file". I believe a few people looked about this in Google.
    – user9303970
    Apr 11 at 10:08











  • Point 2 of the suggested duplicate addresses the differences between pipes and temporary files. It’s just a suggestion though.
    – Stephen Kitt
    Apr 11 at 10:14










  • Perhaps you could clarify what difference you see between a temporary file and a “regular” file...
    – Stephen Kitt
    Apr 11 at 10:15










  • The only total difference I recon is that in general, a "temporary file" has a much shorter life cycle than a "regular file".
    – user9303970
    Apr 11 at 12:00










  • Both are temporary and I want to understand how are they practically different. If FIFOs don't hold data on disk, where do they hold it temporarily when it is being passed through them? On RAM? An answer should define this.
    – user9303970
    Apr 11 at 12:19












up vote
1
down vote

favorite









up vote
1
down vote

favorite












This question already has an answer here:



  • What is the purpose of using a FIFO vs a temporary file or a pipe?

    1 answer



When one sends data (say stdout) to a temporary file, it is likely that something would be done with that data (the temporary file will be used as stdin for some process), then the temporary file will be deleted.



A pipe is a variant of special files, that can chain together commands; passing output from one program, as the input of another.



Generally, a regular pipe would be destroyed right after the process, but a named pipe (commonly named, and not necessarily 100% accurate, "FIFO"), will keep alive after the process ended, until a certain point.



My question



A temporary file is likely to be deleted after usage and a named pipe isn't, but what is the difference between a temporary file and a pipe in general, or at least, an anonymous pipe?



Update



I was wrong to think that a "temporary file" a special file, it isn't; It is a regular file that just being used differently; I would say that a pipe differs in the sense that it is defined as a special file, and has a single narrow purpose (chaining), while a temporary file might have other usages besides chaining, but, there might be a more "total" way to describe the difference.







share|improve this question















This question already has an answer here:



  • What is the purpose of using a FIFO vs a temporary file or a pipe?

    1 answer



When one sends data (say stdout) to a temporary file, it is likely that something would be done with that data (the temporary file will be used as stdin for some process), then the temporary file will be deleted.



A pipe is a variant of special files, that can chain together commands; passing output from one program, as the input of another.



Generally, a regular pipe would be destroyed right after the process, but a named pipe (commonly named, and not necessarily 100% accurate, "FIFO"), will keep alive after the process ended, until a certain point.



My question



A temporary file is likely to be deleted after usage and a named pipe isn't, but what is the difference between a temporary file and a pipe in general, or at least, an anonymous pipe?



Update



I was wrong to think that a "temporary file" a special file, it isn't; It is a regular file that just being used differently; I would say that a pipe differs in the sense that it is defined as a special file, and has a single narrow purpose (chaining), while a temporary file might have other usages besides chaining, but, there might be a more "total" way to describe the difference.





This question already has an answer here:



  • What is the purpose of using a FIFO vs a temporary file or a pipe?

    1 answer









share|improve this question













share|improve this question




share|improve this question








edited Apr 11 at 13:38

























asked Apr 11 at 10:01









user9303970

116224




116224




marked as duplicate by Stephen Kitt, Kiwy, George Vasiliou, Christopher, muru Apr 11 at 14:28


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Stephen Kitt, Kiwy, George Vasiliou, Christopher, muru Apr 11 at 14:28


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • I swear I fail to see how this a duplicate --- there is no emphasis there, as I recon, to how the two pipes differ from a "temporary file". I believe a few people looked about this in Google.
    – user9303970
    Apr 11 at 10:08











  • Point 2 of the suggested duplicate addresses the differences between pipes and temporary files. It’s just a suggestion though.
    – Stephen Kitt
    Apr 11 at 10:14










  • Perhaps you could clarify what difference you see between a temporary file and a “regular” file...
    – Stephen Kitt
    Apr 11 at 10:15










  • The only total difference I recon is that in general, a "temporary file" has a much shorter life cycle than a "regular file".
    – user9303970
    Apr 11 at 12:00










  • Both are temporary and I want to understand how are they practically different. If FIFOs don't hold data on disk, where do they hold it temporarily when it is being passed through them? On RAM? An answer should define this.
    – user9303970
    Apr 11 at 12:19
















  • I swear I fail to see how this a duplicate --- there is no emphasis there, as I recon, to how the two pipes differ from a "temporary file". I believe a few people looked about this in Google.
    – user9303970
    Apr 11 at 10:08











  • Point 2 of the suggested duplicate addresses the differences between pipes and temporary files. It’s just a suggestion though.
    – Stephen Kitt
    Apr 11 at 10:14










  • Perhaps you could clarify what difference you see between a temporary file and a “regular” file...
    – Stephen Kitt
    Apr 11 at 10:15










  • The only total difference I recon is that in general, a "temporary file" has a much shorter life cycle than a "regular file".
    – user9303970
    Apr 11 at 12:00










  • Both are temporary and I want to understand how are they practically different. If FIFOs don't hold data on disk, where do they hold it temporarily when it is being passed through them? On RAM? An answer should define this.
    – user9303970
    Apr 11 at 12:19















I swear I fail to see how this a duplicate --- there is no emphasis there, as I recon, to how the two pipes differ from a "temporary file". I believe a few people looked about this in Google.
– user9303970
Apr 11 at 10:08





I swear I fail to see how this a duplicate --- there is no emphasis there, as I recon, to how the two pipes differ from a "temporary file". I believe a few people looked about this in Google.
– user9303970
Apr 11 at 10:08













Point 2 of the suggested duplicate addresses the differences between pipes and temporary files. It’s just a suggestion though.
– Stephen Kitt
Apr 11 at 10:14




Point 2 of the suggested duplicate addresses the differences between pipes and temporary files. It’s just a suggestion though.
– Stephen Kitt
Apr 11 at 10:14












Perhaps you could clarify what difference you see between a temporary file and a “regular” file...
– Stephen Kitt
Apr 11 at 10:15




Perhaps you could clarify what difference you see between a temporary file and a “regular” file...
– Stephen Kitt
Apr 11 at 10:15












The only total difference I recon is that in general, a "temporary file" has a much shorter life cycle than a "regular file".
– user9303970
Apr 11 at 12:00




The only total difference I recon is that in general, a "temporary file" has a much shorter life cycle than a "regular file".
– user9303970
Apr 11 at 12:00












Both are temporary and I want to understand how are they practically different. If FIFOs don't hold data on disk, where do they hold it temporarily when it is being passed through them? On RAM? An answer should define this.
– user9303970
Apr 11 at 12:19




Both are temporary and I want to understand how are they practically different. If FIFOs don't hold data on disk, where do they hold it temporarily when it is being passed through them? On RAM? An answer should define this.
– user9303970
Apr 11 at 12:19










1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










A named pipe may be temporary in the same sense that a regular file (or a network connection or anything else that provides a "handle" on data) can be temporary, i.e. it may be set up by a script to facilitate some sort of processing, and then deleted before the script exits. It would then be a "temporary (named) pipe".



A named pipe is a file, and so one could argue that the named pipe (which is indeed temporary) is a temporary file.



However, when people refer to a "file" then almost always refer to a "regular file" (i.e. a document of some description), and a named pipe is not a regular file.



A pipe in the shell, set up with | to provide a stream of data from one utility to another, is temporary in the sense that the shell will deallocate any resources related to it when it has been used and is no longer needed.



In the end, pipes (both named and not named) and regular files have different applications, and it should be clear when a regular file is used to store temporary data, and when a named pipe is used to pass data to another process.






share|improve this answer





























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote



    accepted










    A named pipe may be temporary in the same sense that a regular file (or a network connection or anything else that provides a "handle" on data) can be temporary, i.e. it may be set up by a script to facilitate some sort of processing, and then deleted before the script exits. It would then be a "temporary (named) pipe".



    A named pipe is a file, and so one could argue that the named pipe (which is indeed temporary) is a temporary file.



    However, when people refer to a "file" then almost always refer to a "regular file" (i.e. a document of some description), and a named pipe is not a regular file.



    A pipe in the shell, set up with | to provide a stream of data from one utility to another, is temporary in the sense that the shell will deallocate any resources related to it when it has been used and is no longer needed.



    In the end, pipes (both named and not named) and regular files have different applications, and it should be clear when a regular file is used to store temporary data, and when a named pipe is used to pass data to another process.






    share|improve this answer


























      up vote
      1
      down vote



      accepted










      A named pipe may be temporary in the same sense that a regular file (or a network connection or anything else that provides a "handle" on data) can be temporary, i.e. it may be set up by a script to facilitate some sort of processing, and then deleted before the script exits. It would then be a "temporary (named) pipe".



      A named pipe is a file, and so one could argue that the named pipe (which is indeed temporary) is a temporary file.



      However, when people refer to a "file" then almost always refer to a "regular file" (i.e. a document of some description), and a named pipe is not a regular file.



      A pipe in the shell, set up with | to provide a stream of data from one utility to another, is temporary in the sense that the shell will deallocate any resources related to it when it has been used and is no longer needed.



      In the end, pipes (both named and not named) and regular files have different applications, and it should be clear when a regular file is used to store temporary data, and when a named pipe is used to pass data to another process.






      share|improve this answer
























        up vote
        1
        down vote



        accepted







        up vote
        1
        down vote



        accepted






        A named pipe may be temporary in the same sense that a regular file (or a network connection or anything else that provides a "handle" on data) can be temporary, i.e. it may be set up by a script to facilitate some sort of processing, and then deleted before the script exits. It would then be a "temporary (named) pipe".



        A named pipe is a file, and so one could argue that the named pipe (which is indeed temporary) is a temporary file.



        However, when people refer to a "file" then almost always refer to a "regular file" (i.e. a document of some description), and a named pipe is not a regular file.



        A pipe in the shell, set up with | to provide a stream of data from one utility to another, is temporary in the sense that the shell will deallocate any resources related to it when it has been used and is no longer needed.



        In the end, pipes (both named and not named) and regular files have different applications, and it should be clear when a regular file is used to store temporary data, and when a named pipe is used to pass data to another process.






        share|improve this answer














        A named pipe may be temporary in the same sense that a regular file (or a network connection or anything else that provides a "handle" on data) can be temporary, i.e. it may be set up by a script to facilitate some sort of processing, and then deleted before the script exits. It would then be a "temporary (named) pipe".



        A named pipe is a file, and so one could argue that the named pipe (which is indeed temporary) is a temporary file.



        However, when people refer to a "file" then almost always refer to a "regular file" (i.e. a document of some description), and a named pipe is not a regular file.



        A pipe in the shell, set up with | to provide a stream of data from one utility to another, is temporary in the sense that the shell will deallocate any resources related to it when it has been used and is no longer needed.



        In the end, pipes (both named and not named) and regular files have different applications, and it should be clear when a regular file is used to store temporary data, and when a named pipe is used to pass data to another process.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 11 at 15:43









        user9303970

        116224




        116224










        answered Apr 11 at 14:06









        Kusalananda

        102k13199316




        102k13199316












            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay