Thursday, February 17, 2022

[SOLVED] What is the meaning of fork() and grep in Linux?

Issue

As a non-native English speaker, I have difficulty remembering Linux commands compared to other APIs. In Linux, the function names don't seem to indicate their purpose.

Why is the name fork() chosen to create a child process? In the dictionary, fork means "a utensil with two or more prongs", which is unrelated to creating a new process.

Why is the name grep chosen to "print lines matching a pattern"? Does grep mean "g report"?

Where can I find the etymology behind other commands in the Linux API?


Solution

Fork can mean to split in two, as a road (source).

Fork (15): to divide into branches.

Grep's etymology:

From an idiomatic command sequence in the qed and ed text editors: ‘g/re/p’, meaning: globally search for a regular expression and print.

This answer lists the etymology of some Linux commands.



Answered By - Andy
Answer Checked By - Pedro (WPSolving Volunteer)