Inter-process communication In Linux In hIndi

  • Pipes and filters command in linux in hindi
  • tee command command in linux in hindi

Inter-process communication (IPC): IPC ka matlab hota hai ki ek process dusre process se data share karta hai. Linux mein kai tarah ke IPC mechanisms available hain, jinmein pipes, signals, sockets, shared memory, aur semaphores shaamil hain. Yeh mechanisms processes ke beech data sharing, synchronization, aur communication ke liye istemal hote hain.

Inter-process communication In Linux In hIndi

Pipes and Filters:

  • Pipes aur filters ek tarah ka IPC mechanism hai jisme ek process apne output ko dusre process ko dene aur dusre process ko input prapt karne mein madadgar hota hai.
  • Pipe | symbol se represent hota hai aur pipe ka istemal ek command ke output ko dusre command ke input mein bhejne ke liye hota hai.
  • Filters, jaise ki grep, sort, awk, sed, etc., text data ko process karne aur transform karne ke liye istemal hoti hain.

Example:

ls | grep "file" | sort

Is command mein ls command se file list li jati hai, phir grep command se sirf “file” naam wale files ko select kiya jata hai, aur phir sort command se in files ko sort kiya jata hai.

tee Command:

  • tee command ek Linux command hai jo data ko ek file mein write karte hue usse terminal par bhi display karta hai.
  • tee command ka istemal output redirection aur logging ke liye kiya jata hai.
  • Iska basic syntax yeh hota hai:
  command | tee output_file

Example:

ls | tee file_list.txt

Is example mein, ls command se directory ke contents ko file_list.txt file mein likha jata hai aur wahi output terminal par bhi display hota hai.

tee command ka istemal aksar scripts mein debugging aur log file generation ke liye kiya jata hai, jisse aap process ke output ko record kar sakte hain aur usse display bhi kar sakte hain.

Leave a Comment