Skip to main content
deleted 34 characters in body
Source Link
Arcticooling
  • 4.5k
  • 18
  • 56
  • 107

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 differentlybeing 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.

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.

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.

added 541 characters in body; edited title
Source Link
Arcticooling
  • 4.5k
  • 18
  • 56
  • 107

How does a pipe differ from a temporary file differs from a pipe?

The only main behavioral difference I recognize is between the two is that when you sendWhen one sends data (say, stdout of a certain process) to a regular temporary file, it just stays there, and by principle, there isn't a necessity foris likely that something towould be done with that data (the temporary file will be used as stdin for some process), quite like sending it to a regularthen the temporary file will be deleted.

But when you send the data to aA pipe, which defined as is a special file, created per the command,variant of by principle, there is a necessity for something to be done with that dataspecial files, saythat can chain together commands; passing output from one program, processing it as stdinthe input of some commandanother.

Side note

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

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

Update

I hopewas wrong to think that a "temporary file" a special file, it isn't; It is a regular file that just being used differently; I describedwould say that a pipe differs in the mainsense 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 correctl.

How does a pipe differ from a temporary file?

The only main behavioral difference I recognize is between the two is that when you send data (say, stdout of a certain process) to a regular temporary file, it just stays there, and by principle, there isn't a necessity for something to be done with that data, quite like sending it to a regular file.

But when you send the data to a pipe, which defined as a special file, created per the command, by principle, there is a necessity for something to be done with that data, say, processing it as stdin of some command.

Side note

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

How does a pipe differ from a temporary file? I hope I described the main difference correctl

How does a temporary file differs from a pipe?

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.

added 48 characters in body
Source Link
Arcticooling
  • 4.5k
  • 18
  • 56
  • 107

The only main behavioral difference I recognize is between the two is that when you send data (say, stdout of a certain process) to a regular temporary file, it just stays there, and by principle, there isn't a necessity for something to be done with that data, quite like sending it to a regular file.

But when you send the data to a pipe, which defined as a special file, created per the command, by principle, there is a necessity for something to be done with that data, say, processing it as stdin of some command.

Side note

SurlyGenerally, 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

How does a pipe differ from a temporary file? I hope I described the main difference correctl

The only main behavioral difference I recognize is between the two is that when you send data (say, stdout of a certain process) to a regular temporary file, it just stays there, and by principle, there isn't a necessity for something to be done with that data, quite like sending it to a regular file.

But when you send the data to a pipe, which defined as a special file, created per the command, by principle, there is a necessity for something to be done with that data, say, processing it as stdin of some command.

Side note

Surly, 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

How does a pipe differ from a temporary file?

The only main behavioral difference I recognize is between the two is that when you send data (say, stdout of a certain process) to a regular temporary file, it just stays there, and by principle, there isn't a necessity for something to be done with that data, quite like sending it to a regular file.

But when you send the data to a pipe, which defined as a special file, created per the command, by principle, there is a necessity for something to be done with that data, say, processing it as stdin of some command.

Side note

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

How does a pipe differ from a temporary file? I hope I described the main difference correctl

deleted 63 characters in body
Source Link
Arcticooling
  • 4.5k
  • 18
  • 56
  • 107
Loading
deleted 49 characters in body
Source Link
Arcticooling
  • 4.5k
  • 18
  • 56
  • 107
Loading
deleted 49 characters in body
Source Link
Arcticooling
  • 4.5k
  • 18
  • 56
  • 107
Loading
Source Link
Arcticooling
  • 4.5k
  • 18
  • 56
  • 107
Loading