BCA / B.Tech 9 min read

ED in Hindi

RK

लेखक Ratan Kumawat · संस्थापक, NotesMedia

प्रकाशित:

त्वरित सारांश और मुख्य बिंदु

  • • विषय फोकस: Operating System (OS) Notes in Hindi | ऑपरेटिंग सिस्टम नोट्स (BCA / B.Tech Syllabus)
  • • मुख्य विषय: ED in Hindi - General Topics
  • • अवलोकन: Quick Answer: Linux aur Unix operating systems mein ed original standard Line Editor hai jise Ken Thompson ne 1969 mein Bell Labs mein develop kiya tha....
  • • मुख्य अवधारणाएं: ED editor, Line editor commands patterns Hindi, Substitutions ED,ED editor, Line editor commands patterns, Substitutions ED
Quick Answer: Linux aur Unix operating systems mein ed original standard Line Editor hai jise Ken Thompson ne 1969 mein Bell Labs mein develop kiya tha. Yah full-screen visual editor (jaise Vi ya Nano) ke mukable buffer mein line-by-line basis par text create aur modify karta hai. Isme do mukhya modes hote hain: Command Mode aur Input Mode (jise dot . type karke terminate kiya jaata hai). Famous Unix tools jaise grep (g/re/p) aur sed ed editor ke syntax par hi aadharit hain.

Linux mein ed Line Editor kya hai aur iska Itihas

Unix ke shuruati dino (1970s) mein modern graphical screens aur arrow keys wale visual displays exist nahi karte the. Computers teletype machines (teleprinters) aur low-speed serial terminals par connect hote the jahan paper roll par output print hota tha. Aise vatavaran mein poori file ko screen par ek sath scroll karna sambhav nahi tha.

Isiliye Ken Thompson ne 1969 mein ed editor banaya, jo 1971 ke Unix Version 1 ka bhi hissa tha. Yah pure text-based line editor hai jo terminal cursor ko screen par move karne ke badle memory buffer mein text lines ko index numbers ke through manipulate karta hai. Linux basic commands ke baare mein janne ke liye aap hamare Commands of Linux in Hindi aur OS internals ke liye Linux in Hindi notes padh sakte hain.

Unix ecosystem mein ed ka historic yogdan:

  • grep command ka janam: ed editor ke global regular expression search command g/re/p (Global / Regular Expression / Print) se famous grep command ka naam bana.
  • sed (Stream Editor): Non-interactive batch text streams ko automate karne ke liye sed utility ed editor ke command set par hi design ki gayi.
  • vi editor ka base: Bill Joy ne pehle ed ko extend karke ex editor banaya aur phir usme Visual mode add karke vi banaya.
Advertisement

ed Editor ke Do Mukhya Modes

ed ek modal editor hai jo do distinct modes mein kaam karta hai:

  1. Command Mode: Jab aap ed launch karte hain, toh yah default roop se command mode mein hota hai. Is mode mein har keystroke ek action command hoti hai (jaise p se print, d se delete, s se search/replace). Command mode mein koi prompt nahi dikhta; agar koi invalid command type ho jaaye toh ed sirf question mark (?) display karta hai.
  2. Input / Text Mode: Text type karne ke liye user append (a), insert (i), ya change (c) command deta hai. Iske baad jo bhi lines likhi jaati hain, wah buffer mein store hoti hain. Input mode se nikal kar wapas command mode mein aane ke liye nayi line par akela dot (.) type karke Enter dabaya jaata hai.

ed Editor ka Step-by-Step Practical Walkthrough

Terminal par ed ka use karke file banane aur edit karne ka step-by-step example dekhein:

Step 1: Editor Start karna

$ ed myfile.txt
myfile.txt: No such file or directory

Agar file nayi hai toh message aata hai aur cursor khali line par wait karta hai.

Step 2: Input Mode mein Text likhna (a command)

a
NotesMedia is a free study portal.
We provide easy Hindi notes for BCA and MCA.
Happy Learning!
.

Pehli line par a dabane se text append mode shuru hua. Teeno lines type karne ke baad aakhiri line par single dot . type karke Enter dabaya jisse input mode end ho gaya.

Step 3: Text Display karna (p aur n command)

1,$p

1,$p command line number 1 se lekar aakhiri line ($) tak poora content print karti hai:

NotesMedia is a free study portal.
We provide easy Hindi notes for BCA and MCA.
Happy Learning!

Agar line numbers ke sath dekhna ho, toh 1,$n command run karein.

Step 4: Search aur Replace karna (s command)

1s/free/popular/

Line 1 par word free ko popular se replace kar dega. Result verify karne ke liye 1p dabayein:

NotesMedia is a popular study portal.

Step 5: File Save karna aur Exit karna (w aur q command)

w
99
q

w dabane par buffer disk par save hota hai aur ed total written characters count (yahan 99 bytes) print karta hai. q dabate hi editor cleanly exit ho jaata hai. Linux storage structure samajhne ke liye File System in Linux in Hindi note refer karein.

Essential ed Commands Reference Table

Neeche diye gaye table mein ed line editor ki sabse zaroori single-letter commands unke syntax aur functions ke sath di gayi hain:

Command Syntax Example Function / Purpose
a (Append) a ya 3a Current line ya line 3 ke baad naya text add karna shuru karta hai. Single dot . se band hota hai.
i (Insert) i ya 2i Current line ya line 2 ke theek upar naya text insert karta hai.
c (Change) 2c Line number 2 ke existing text ko delete karke naya text likhta hai.
d (Delete) 3d ya 1,5d Specified line ya range (line 1 se 5 tak) ko buffer se delete karta hai.
p (Print) p ya 1,$p Specified lines ko terminal screen par print karta hai.
n (Number) 1,$n Lines ko unke line numbers ke sath format karke display karta hai.
s (Substitute) s/old/new/g Line par regular expression search karke text replace karta hai.
g (Global) g/error/p Poori file mein jahan bhi pattern match ho, un sabhi lines par command execute karta hai.
h (Help) h Jab ed error mein ? fekta hai, toh h dabane par detail error message milta hai.
w (Write) w ya w file.txt Buffer content ko file mein save karta hai aur byte size print karta hai.
q (Quit) q ya Q Editor se exit karta hai. Q bina save kiye forcefully exit karta hai (ya q do baar dabayein).

Comparison: ed vs vi/vim vs nano

Linux environment mein use hone wale alag-alag generation ke text editors ka comparative analysis neeche table mein diya gaya hai:

Comparison Parameter ed Line Editor vi / vim Editor nano Editor
Editor Architecture Line Editor (Buffer based, single line interaction). Modal Full-Screen Visual Editor. Modeless Simple Visual Editor.
Display Interface Zero visual canvas; screen par scroll ya arrow cursor nahi hota. Full terminal window terminal curses library se render hoti hai. Friendly full-screen window with bottom shortcut menu.
Resource Footprint Extremely tiny (kuch kilobytes memory). Lightweight se moderate. Moderate.
System Availability POSIX standard; zyada tar Unix systems par milta hai (kuch modern Linux distros mein alag se install karna padta hai). Lagbhag har Linux server par pre-installed. Modern user-friendly Linux distributions mein default.
Primary Modern Use Case Emergency rescue shells, automated shell scripts, patch creation. Professional programming, system administration, configuration edits. Beginner students aur quick simple configuration changes.
Advertisement

ed Editor ke Advantages aur Limitations

Advantages:

  • Crash Rescue System: Jab Linux system crash ho jaata hai, terminal drivers fail ho jaate hain ya terminal type (TERM) unset hota hai, tab vi aur nano kaam nahi karte. Aise emergency rescue shells mein ed bhi kaam aata hai kyunki use full-screen terminal ki zaroorat nahi hoti.
  • Zero Overhead: Yah instant load hota hai aur zero CPU/RAM overhead ke sath execute hota hai.
  • Script Automation: Shell script ke andar standard input pipe (heredoc <<EOF) ke through bina user interaction ke config files automatically edit ki ja sakti hain.

Limitations:

  • Visual feedback nahi hota; bina p command run kiye changes screen par nahi dikhte.
  • Beginners ke liye steep learning curve hai; galti hone par sirf ? aata hai.
  • Badi source code files navigate karna aur multi-file project manage karna complex hota hai.

Common Mistakes to Avoid

  • Input mode (a ya i) start karne ke baad text likhne ke baad aakhiri line par single dot . type karna bhoolna; bina dot ke ed input mode mein hi rehta hai aur aapki commands ko bhi text samajhkar file mein jod deta hai.
  • Direct q daba kar band karna jab changes save na huye hon; ed ? display karega. Pehle w dabakar save karein ya discard karne ke liye Q (ya dobara q) use karein.
  • Error message samajhne ke liye h command na use karna; ? aane par hamesha h press karein taaki exact reason (jaise "No match" ya "Cannot open output file") pata chale.

Exam के लिए Important Questions

Short Questions (2-3 marks)

  1. Linux mein ed editor ko "Line Editor" kyon kaha jaata hai?
  2. ed editor ke Command Mode aur Input Mode mein kya antar hai?
  3. Input mode se command mode mein wapas switch karne ke liye kya type kiya jaata hai?
  4. Unix ke famous command grep ka naam ed editor se kaise juda hua hai?

Long Questions (5-10 marks)

  1. Linux ed Line Editor ke itihas aur architecture par detail note likhiye. Yah emergency recovery shells mein aaj bhi kyon anivarya maana jaata hai?
  2. ed editor ki pramukh single-letter commands (a, i, c, d, p, s, w, q) ko unke syntax aur practical examples ke sath table banakar samjhaiye.
  3. Line Editor (ed), Full-screen Modal Editor (vi/vim) aur Modeless Editor (nano) ke beech tulnatmak antar (comparison) spasht kijiye.

Frequently Asked Questions (FAQs)

Jab ed mein sirf question mark '?' aata hai toh iska kya matlab hota hai?

ed mein question mark ? ka matlab hai error (jaise invalid command, file not found, ya search pattern not found). Error ka exact description janne ke liye keyboard se h type karke Enter dabayein.

Kya ed editor mein multiple lines ko ek sath delete kiya ja sakta hai?

Haan, range specify karke aisa kiya ja sakta hai. Example ke liye 5,10d command line number 5 se line 10 tak sabhi 6 lines ko ek sath delete kar deti hai.

Shell script mein ed ka use kaise karte hain?

Bash script mein Here-Document (<<EOF) ka use kiya jaata hai:

ed -s config.txt <<EOF
1s/PORT=80/PORT=8080/
w
q
EOF

Yah script bina terminal GUI ke file ko automatically modify kar deti hai.

1,$s/foo/bar/g command ka kya matlab hai?

Yah command line 1 se lekar last line ($) tak poori file mein jahan bhi foo word milega, use globally bar se replace kar degi.

अक्सर पूछे जाने वाले प्रश्न (FAQs)

Quick Answer: Linux aur Unix operating systems mein ed original standard Line Editor hai jise Ken Thompson ne 1969 mein Bell Labs mein develop kiya tha.
Operating System (OS) Notes in Hindi | ऑपरेटिंग सिस्टम नोट्स के पाठ्यक्रम में ED in Hindi एक महत्वपूर्ण अध्याय है। यह मुख्य सिद्धांतों, परीक्षा प्रश्नों और सूत्रों को समझने के लिए अत्यधिक आवश्यक है।
हाँ, NotesMedia पर आपको ED in Hindi के महत्वपूर्ण प्रश्नोत्तर, हल किए गए उदाहरण और नोट्स बिल्कुल मुफ्त मिलेंगे। अधिक अभ्यास के लिए आप हमारा ऐप भी डाउनलोड कर सकते हैं।
Advertisement

In this Chapter

ED in Hindi
Distributed System in Hindi
Real Time System in Hindi
System Calls in Hindi
System Program in Hindi
Structure of Operating System in Hindi
Layers Design of Structure in Hindi
Unix in Hindi
Virtual Machine in Hindi
Kernel-Based Operating System in Hindi
Process in Hindi – OS में Process क्या है
Interacting Processes in Hindi
Threads in Hindi
Fundamental of Schedulling in Hindi
Scheduling Criteria in Hindi
Long Medium Short Term Scheduling in Hindi
Scheduling Algorithms in Hindi
Structure of Concurrent System in Hindi
Critical Region in Hindi
Critical Section in Hindi
Inter process Communication in Hindi
Monitor in Hindi
Semaphore in OS in Hindi – Counting और Binary Semaphore
Semaphores Implementation & Uses in Hindi
Logical and Physical Address in Hindi
Swapping in Hindi
Contiguous Allocation in Hindi
Segmentation in Hindi
Paging in OS in Hindi – Paging और Segmentation
Paging with Segmentation in Hindi
kernel Memory Allocation in Hindi
Page Replacement Algorithms in Hindi
Virtual Memory in Hindi
Virtual Memory with demand Paging in Hindi
Deadlock & Characterization in Hindi
Methods for Handling Deadlocks in Hindi
Deadlock Thrashing in Hindi
Allocation of Frames in Hindi
Virtual Memory using Segmentation in Hindi
Interprocess Communication protocol in Hindi
Network Operating System in Hindi
Design Issues in Distributed File System in Hindi
Network Structure in Hindi
Structure Distributed System in Hindi
File System and Coordination in Hindi
Linux in Hindi
Commands of Linux in Hindi | लिनक्स के कमांड्स हिंदी में
Programmer Interface & File manipulation in Hindi
Process control in Linux in Hindi
Linux Kernel & Signals in Hindi
File System in Linux in Hindi
block & inodes in Hindi
System Editor in Hindi
Character Transliteration in Hindi
Vi Editor & There Commands in Hindi
Shell Script in Hindi
Looping & Decision Making in Hindi
Variables & File name Expansion in Hindi
Array in Hindi OS
Sub Program in Hindi
C interface with Linux in Hindi
Simpel Shell Programs in Hindi
BCA Part-1 | Operating Systems | Semester-I | MDSU Exam Paper 2023 (Held in 2024)
What is Operating System (OS) in Hindi
Operating System (OS) All Important Questions and Answers in Hindi (MDSU)
BCA || Operating System 2025 Paper || MDSU Exam Paper
BCA | OS(Operating System) 2023 Paper | MDSU Exam Paper
Type of Operating System in Hindi
Goals of Operating System in Hindi
Operation of Operating system in Hindi
Resource Allocation & Functions in Hindi
class of Operating system in Hindi
Batch Processing in Hindi
Multi Processing in Hindi
Time Sharing in Hindi