Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8086385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:25:44+00:00 2026-06-05T18:25:44+00:00

When I echo into files at some arbitrary locations in Linux, i.e. echo >

  • 0

When I echo into files at some arbitrary locations in Linux, i.e. echo > /tmp/file, some running processes respond. Is this IPC via file pipe?

Does this mean a running process always open the file to be read? But so, how can the file be written, since the file stream is locked by by its own process?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T18:25:48+00:00Added an answer on June 5, 2026 at 6:25 pm

    If you want use a file to communicate with another process, you should have a look at man fifo.

    I’ll report here just the first lines:

    NAME
           fifo - first-in first-out special file, named pipe
    
    DESCRIPTION
           A FIFO special file (a named pipe) is similar to a pipe, except that it
           is accessed as part of the file system.  It can be opened  by  multiple
           processes  for  reading or writing.  When processes are exchanging data
           via the FIFO, the kernel passes all data internally without writing  it
           to the file system.  Thus, the FIFO special file has no contents on the
           file system; the file system entry merely serves as a  reference  point
           so that processes can access the pipe using a name in the file system.
    

    I think this is what you need.

    Just think to it as a buffer. It must be opened both for reading and for writing by different process. The process who’s reading will be blocked until the writing process doesn’t write on it. When the writing process finish to write, close the file and that is the green light for the reading process to start empty the buffer. It’s a FIFO, so the first line written will be the first line read. Then the writing process can open it again and they start again.

    You can create a FIFO with mkfifo. Have a look to man mkfifo.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to add some simple text into some files. Specifically, I do this
This baffles me. For some weird reason, move_uploaded_file() doesn't put the file into the
I want to use echo to add data into a text file progressively. I
I have this code to show me some web page into my domain (in
I'm using WinSCP to transfer some files over to another system, but I'm running
My situation is the following: a big (10GB) compressed file containing some files (~60)
So, my code was using relative paths, but running into some problems with common
thanks for reading & your suggestions. I'm moving files into respective directories, only some
I am trying to echo a result from xml into my html code form
$query=INSERT INTO subscriber (RandomCode,Email,CreateDate,UpdateDate <?if ($num!=0) echo ','.$string; ?> ) VALUES (?,?,?,?,CURDATE(),'',<? if ($num!=0)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.