OS Notes Download
Unit1_OS_Hindi , Unit1_OS_EnglishWednesday, April 12, 2023
Multitasking Operating System मल्टीटास्किंग ऑपरेटिंग सिस्टम

A Multitasking Operating System allows a single user to perform multiple tasks at the same time. The operating system rapidly switches the CPU between tasks, creating the illusion that all tasks are running simultaneously.
मल्टीटास्किंग ऑपरेटिंग सिस्टम एक ही यूज़र को एक साथ कई कार्य करने की सुविधा देता है। ऑपरेटिंग सिस्टम बहुत तेज़ी से CPU को विभिन्न कार्यों के बीच स्विच करता है, जिससे सभी कार्य एक साथ चलते हुए प्रतीत होते हैं।
In multitasking systems, each task gets a small amount of CPU time called a time slice. This efficient time-sharing mechanism improves system responsiveness.
मल्टीटास्किंग सिस्टम में प्रत्येक कार्य को CPU समय का एक छोटा भाग दिया जाता है, जिसे टाइम स्लाइस कहा जाता है। यह टाइम-शेयरिंग प्रणाली सिस्टम की प्रतिक्रिया क्षमता को बढ़ाती है।
How Multitasking Operating System Works ⚙️
The operating system divides CPU time among multiple tasks. When one task’s time slice ends, the CPU is switched to another task.
ऑपरेटिंग सिस्टम CPU समय को कई कार्यों में विभाजित करता है। जब एक कार्य का टाइम स्लाइस समाप्त हो जाता है, तब CPU दूसरे कार्य को दे दिया जाता है।
This switching happens so quickly that users feel all applications are running at the same time.
यह स्विचिंग इतनी तेज़ होती है कि यूज़र को सभी एप्लिकेशन एक साथ चलते हुए महसूस होते हैं।
Types of Multitasking Operating System 🔀
Multitasking operating systems can be classified into two types.
मल्टीटास्किंग ऑपरेटिंग सिस्टम को दो प्रकारों में बाँटा जा सकता है।
1. Preemptive Multitasking ⚡
In preemptive multitasking, the operating system decides when a task will be interrupted and moved out of the CPU.
प्रीएम्प्टिव मल्टीटास्किंग में ऑपरेटिंग सिस्टम यह तय करता है कि किसी कार्य को कब CPU से हटाया जाएगा।
2. Cooperative Multitasking 🤝
In cooperative multitasking, a running task voluntarily releases the CPU.
कोऑपरेटिव मल्टीटास्किंग में चल रहा कार्य स्वयं CPU को छोड़ता है।
Features of Multitasking Operating System ✨
Multitasking operating systems provide several important features.
मल्टीटास्किंग ऑपरेटिंग सिस्टम की कुछ प्रमुख विशेषताएँ होती हैं।
• Multiple tasks for a single user
• Time-sharing mechanism
• Fast task switching
• Improved system responsiveness
• एक यूज़र के लिए कई कार्य
• टाइम-शेयरिंग प्रणाली
• तेज़ कार्य स्विचिंग
• बेहतर सिस्टम प्रतिक्रिया
Advantages of Multitasking Operating System ✅
Multitasking operating systems greatly enhance user productivity.
मल्टीटास्किंग ऑपरेटिंग सिस्टम यूज़र की उत्पादकता को काफी बढ़ाते हैं।
Users can perform multiple activities like browsing, listening to music, and editing documents simultaneously.
यूज़र एक साथ ब्राउज़िंग, म्यूज़िक सुनना और डॉक्यूमेंट एडिट करना जैसे कई कार्य कर सकते हैं।
Disadvantages of Multitasking Operating System ❌
Multitasking also comes with certain limitations.
मल्टीटास्किंग की कुछ सीमाएँ भी होती हैं।
• High CPU and memory usage
• System may slow down
• Complex task scheduling
• CPU और मेमोरी का अधिक उपयोग
• सिस्टम धीमा हो सकता है
• जटिल कार्य शेड्यूलिंग
Example of Multitasking Operating System 🖥️
Multitasking operating systems are widely used in personal computers.
मल्टीटास्किंग ऑपरेटिंग सिस्टम का उपयोग सामान्यतः पर्सनल कंप्यूटरों में किया जाता है।
Windows, Linux, and macOS are popular examples of multitasking operating systems.
Windows, Linux और macOS मल्टीटास्किंग ऑपरेटिंग सिस्टम के प्रमुख उदाहरण हैं।
Difference Between Multiprogramming and Multitasking 📊
Multiprogramming focuses on maximizing CPU utilization, while multitasking focuses on user interaction and responsiveness.
मल्टीप्रोग्रामिंग का मुख्य उद्देश्य CPU उपयोग बढ़ाना है, जबकि मल्टीटास्किंग यूज़र इंटरैक्शन और प्रतिक्रिया पर केंद्रित होती है।
Conclusion ✨
Multitasking operating systems are essential for modern computing as they allow users to perform multiple tasks efficiently and smoothly.
आधुनिक कंप्यूटिंग के लिए मल्टीटास्किंग ऑपरेटिंग सिस्टम अत्यंत आवश्यक हैं क्योंकि ये यूज़र्स को कई कार्य कुशलतापूर्वक और आसानी से करने की सुविधा देते हैं।
Software and It's types - application, system and utility software सॉफ्टवेयर एवं उसके प्रकार
Software is an important component of computer system. It is a collection of different programs which are used to perform a specific task. we can't touch or sense computer software because it runs inside hardware device. Software's and hardware's are Supplementary. it means we can't achieve one in the absence of another.
सॉफ्टवेयर कंप्यूटर सिस्टम का एक महत्वपूर्ण घटक है। यह विभिन्न प्रोग्रामों का एक संग्रह है जो किसी विशिष्ट कार्य को करने के लिए उपयोग किए जाते हैं। हम कंप्यूटर सॉफ्टवेयर को न तो छू सकते हैं और न ही महसूस कर सकते हैं क्योंकि यह हार्डवेयर डिवाइस के अंदर चलता है। सॉफ्टवेयर और हार्डवेयर पूरक हैं। इसका अर्थ है कि हम एक के अभाव में दूसरे को प्राप्त नहीं कर सकते है।
Software is categorized into three types-
1) Application Software
2) System Software
3) Utility Software.
सॉफ्टवेयर को तीन प्रकारों में वर्गीकृत किया गया है-
1) एप्लीकेशन सॉफ्टवेयर
2) सिस्टम सॉफ्टवेयर
3) यूटिलिटी सॉफ्टवेयर।
1) Application Software- This type of software's are used to perform tasks given by the user. It is also called application software or User Software or Apps. Application Software requests system software to access hardware devices of computer after that system software approves its request and then it can give input to hardware device and get output from it after processing.Absence of application software doesn't affect working of Computer System. Example- M.S.office, PDF reader, Computer games, audio-video players, image editors, social networking apps, tally, auto-cad etc.
एप्लीकेशन सॉफ्टवेयर- इस प्रकार के सॉफ्टवेयर का उपयोग उपयोगकर्ता द्वारा दिए गए कार्यों को करने के लिए किया जाता है। इसे एप्लीकेशन सॉफ्टवेयर या यूजर सॉफ्टवेयर या एप्स भी कहते हैं। एप्लिकेशन सॉफ़्टवेयर कंप्यूटर के हार्डवेयर उपकरणों तक पहुँचने के लिए सिस्टम सॉफ़्टवेयर का अनुरोध करता है, उसके बाद सिस्टम सॉफ़्टवेयर उसके अनुरोध को स्वीकार करता है और फिर यह हार्डवेयर डिवाइस को इनपुट दे सकता है और प्रसंस्करण के बाद इससे आउटपुट प्राप्त कर सकता है। एप्लिकेशन सॉफ़्टवेयर की अनुपस्थिति कंप्यूटर सिस्टम के काम को प्रभावित नहीं करती है।उदाहरण- एम.एस.ऑफिस, पीडीएफ रीडर, कंप्यूटर गेम, ऑडियो-वीडियो प्लेयर, इमेज एडिटर, सोशल नेटवर्किंग ऐप, टैली, ऑटोकैड आदि।
2) System Software- This type of software's are used to control hardware devices of computer System. It is called System software. It has full control over computer hardware and they can approve or disapprove request of application software's for accessing a particular hardware device of computer. In absence of system software computer and its hardware devices doesn't work properly.Thus system software is must required for working of computer system. Example- Assembler, Compiler, Linker, loader, Interpreter, scheduler and operating system.
सिस्टम सॉफ्टवेयर- इस प्रकार के सॉफ्टवेयर का उपयोग कंप्यूटर सिस्टम के हार्डवेयर उपकरणों को नियंत्रित करने के लिए किया जाता है। इसे सिस्टम सॉफ्टवेयर कहा जाता है। कंप्यूटर हार्डवेयर पर इसका पूर्ण नियंत्रण होता है और वे कंप्यूटर के किसी विशेष हार्डवेयर डिवाइस तक पहुँचने के लिए एप्लिकेशन सॉफ़्टवेयर के अनुरोध को स्वीकृत या अस्वीकृत कर सकते हैं। सिस्टम सॉफ्टवेयर के अभाव में कंप्यूटर और उसके हार्डवेयर उपकरण ठीक से काम नहीं करते हैं। इस प्रकार कंप्यूटर सिस्टम के काम करने के लिए सिस्टम सॉफ्टवेयर की आवश्यकता होती है।उदाहरण- असेंबलर, कंपाइलर, लिंकर, लोडर, इंटरप्रेटर, शेड्यूलर और ऑपरेटिंग सिस्टम।
3) Utility Software- These are special type of application software which are useful for both computer system and it's users because it increases their performance. This are provided as complementary or by default apps with computer system.Example- Antivirus, memory cleaner, screen saver, themes, digital clock, calculator, notes etc.
यूटिलिटी सॉफ्टवेयर- ये एक विशेष प्रकार के एप्लीकेशन सॉफ्टवेयर होते हैं जो कंप्यूटर सिस्टम और इसके उपयोगकर्ताओं दोनों के लिए उपयोगी होते हैं क्योंकि यह उनके प्रदर्शन को बढ़ाता है। यह कंप्यूटर सिस्टम के साथ पूरक या डिफ़ॉल्ट ऐप्स के रूप में प्रदान किया जाता है।उदाहरण- एंटीवायरस, मेमोरी क्लीनर, स्क्रीन सेवर, थीम, डिजिटल क्लॉक, कैलकुलेटर, नोट्स आदि।
Operating System and its goals/objectives ऑपरेटिंग सिस्टम एवं उसके लक्ष्य/उद्देश्य
Operating System is a system software. It is a collection of different programs which work between different users and computer hardware. It means, it is an interface between user and hardware of computer system. So that application programs can run on Computer in effective and convenient manner. OS is very important part of any computer system because it manages all the resources of computer like input-output devices, Ram-Rom, hard disc, microprocessors, network connection etc.
2) Efficiency- The secondary goal of OS is to allocate all the resources of system to various application programs as efficiently as possible, due to which application programs can provide desired output to it's users very fast and with accuracy.
kde vs gnome (केडीई vs जीनोम ), gnome vs kde (जीनोम vs केडीई ) in hindi in english
Sr.No. | GNOME (जीनोम) | KDE (केडीई) |
1 | The full form of GNOME is GNU Network Object Model Environment. It is a desktop environment or a graphical user interface that runs on view level of a computer system. GNOME का पूरा नाम GNU नेटवर्क ऑब्जेक्ट मॉडल एनवायरनमेंट है। यह एक डेस्कटॉप वातावरण या एक ग्राफिकल यूजर इंटरफेस है जो कंप्यूटर सिस्टम के व्यू लेवल पर रन होता है। | The full form of KDE is K-Desktop Environment. It is a desktop environment designed by the KDE Community for cross-platform applications run on Linux, FreeBSD, Microsoft Windows, Solaris and Mac OS etc. KDE का पूरा नाम के-डेस्कटॉप एनवायरनमेंट है। यह एक डेस्कटॉप वातावरण है जिसे केडीई समुदाय द्वारा लिनक्स, फ्रीबीएसडी, माइक्रोसॉफ्ट विंडोज, सोलारिस और मैक ओएस आदि पर रन किये जाने वाले क्रॉस-प्लेटफॉर्म एप्लीकेशन के लिए डिजाइन किया गया है। |
2 | It is free and open source software. यह फ्री और ओपन सोर्स सॉफ्टवेयर है। | It is free and open source software. यह फ्री और ओपन सोर्स सॉफ्टवेयर है। |
3 | Motto- An intuitive and attractive desktop for users आदर्श वाक्य- उपयोगकर्ताओं के लिए एक सहज और आकर्षक डेस्कटॉप | Motto- Experience Freedom! आदर्श वाक्य- स्वतंत्रता का अनुभव करें! |
4 | A top-to-bottom free desktop environment designed for simplicity, accessibility, and ease of internationalization and localization. एक टॉप-टू-बॉटम मुक्त डेस्कटॉप वातावरण जो सरलता,पहुँच और अंतर्राष्ट्रीयकरण और स्थानीयकरण में आसानी के लिए डिज़ाइन किया गया है। | A one-stop, integrated desktop environment; carrying out day-to-day tasks without reliance on command-line interface. एक-स्टॉप, एकीकृत डेस्कटॉप वातावरण; कमांड-लाइन इंटरफेस पर निर्भर हुए बिना दिन-प्रतिदिन के कार्यों को पूरा करना। |
5 | Introduced in 1999 by Miguel de Icaza and Federico Mena and Developed by The GNOME Project 1999 में मिगुएल डे इकाज़ा और फेडेरिको मेना द्वारा प्रस्तुत किया गया और जीनोम प्रोजेक्ट द्वारा विकसित किया गया | Introduced in 1996 by Matthias Ettrich and Developed by KDE Community मैथियास एट्रिच द्वारा 1996 में प्रस्तुत किया गया और केडीई समुदाय द्वारा विकसित किया गया |
6 | Minimum System Requirements - 700 Mhz CPU, 768 MB RAM न्यूनतम सिस्टम आवश्यकताएँ- 700 मेगाहर्ट्ज सीपीयू, 768 एमबी रैम | Minimum System Requirements- 1 Ghz CPU, 615 MB RAM न्यूनतम सिस्टम आवश्यकताएँ- 1 गीगाहर्ट्ज सीपीयू, 615 एमबी रैम |
7 | Its Current Stable Release is 3.10 (September 26, 2013) इसका वर्तमान स्थिर संस्करण- 3.10 (26 सितंबर, 2013) है | Its Current Stable Release is 4.11 (August 14, 2013) इसका वर्तमान स्थिर संस्करण- 4.11 (अगस्त 14, 2013) है |
8 | It uses GTK+ Toolkit यह जीटीके+ टूलकिट का उपयोग करता है | It uses QT Toolkit यह क्यूटी टूलकिट का उपयोग करता है |
9 | Products - GTK Apps उत्पाद - जीटीके ऐप्स | Products - KDE Software Compilation, Calligra Suite, KDevelop, Amarok, etc उत्पाद - केडीई सॉफ्टवेयर संकलन, कैलीग्रा सूट, केडेवलप, अमरोक इत्यादि |
10 Reference:- | Website - GNOME.org | Website- kde.org |
Wikipedia- kde, gnome , diffen.com, | ||
vi Editor in Linux/Unix विआई एडिटर in English/Hindi
The vi editor is the most popular and commonly used Unix text editor software. It is available in all Linux Distributions. vi editor was developed by Bill joy in C language for Unix like Operating systems in 1976. Vi is a user friendly and very powerful text editor. it is fully based on commands. It takes very less memory space so we can effectively perform any operation on text files in it.The improved version of vi editor is Vim (Vi improved).
vi एडिटर अत्यधिक प्रचलित एवं कार्य में आसान यूनिक्स टेक्स्ट एडिटर सॉफ्टवेयर है जो सभी लिनक्स डिस्ट्रीब्यूशन उपलब्ध होता है। इसे सन 1976 में बिल जॉय नामक इंजीनियर ने C लैंग्वेज में Unix जैसे ऑपरेटिंग सिस्टम्स लिए निर्मित किया था। vi समझने में आसान एवं शक्तिशाली टेक्स्ट एडिटर है। vi एडिटर पूर्णतः commands आधारित होता है । यह बहुत काम मात्रा में मेमोरी स्पेस ग्रहण करता है,जिसके फलस्वरूप इस एडिटर में टेक्स्ट फाइल्स पर ऑपरेशन प्रभावी ढंग से किये जा सकते है ।vi एडिटर का परिष्कृत वर्शन vim (vi इम्प्रूव्ड) है।
Some Important Linux Commands (लिनक्स कमांड्स) in hindi in english
Linux Commands (लिनक्स कमांड्स) :-
1. pwd command
the pwd command is use to find out the path of the current working directory (folder) in which we are working.
pwd कमांड का उपयोग उस वर्तमान वर्किंग डायरेक्टरी (फोल्डर) के पथ का पता लगाने के लिए किया जाता है जिसमें हम कार्य कर रहे हैं।
Example :-
$pwd
/home/username.
2. cd command
cd command is use to navigate through the Linux files and directories, use the cd command - Suppose you’re in /home/username/Documents and you want to go to Photos, a sub directory of Documents then type command-
cd कमांड का उपयोग लिनक्स फाइलों और डायरेक्टरीओं के माध्यम से नेविगेट करने के लिए किया जाता है, सीडी कमांड का उपयोग निम्नानुसार करें- मान लीजिए कि आप /home/username/Documents में हैं और आप Photos पर जाना चाहते हैं, जो Documents की एक सबडायरेक्टरी है, तब कमांड टाइप करें-
Example:-
$cd Photos
$cd.. (directory up)
$cd (home folder)
$cd- (previous directory)
3. ls command
The ls command is used to view the contents of present working directory. If you want to see the content of other directories, type ls and then the directory’s path.
ls कमांड का उपयोग वर्तमान कार्य डायरेक्टरी की सामग्री को देखने के लिए किया जाता है। यदि आप अन्य डायरेक्टरीओं की सामग्री देखना चाहते हैं, तो ls टाइप करें और इसके पश्चात् डायरेक्टरी का पथ लिखें।
Example:-
$ls
$ls-a /home/username/Documents
There are some variations of the ls command-
ls कमांड के कुछ रूपांतर हैं-
ls -a In Linux, hidden files start with . (dot) symbol and they are not visible in the regular directory. The (ls -a) command will enlist the whole list of the current directory including the hidden files.
ls -a लिनक्स में, छिपी हुई फाइलें शुरू होती हैं। (डॉट) प्रतीक और वे नियमित निर्देशिका में दिखाई नहीं दे रहे हैं। (Ls -a) कमांड वर्तमान निर्देशिका की पूरी सूची को छिपी हुई फाइलों सहित सूचीबद्ध करेगा।
ls -l It will show the list in a long list format.
ls -l यह सूची को एक लंबी सूची प्रारूप में दिखाएगा।
ls -lh This command will show you the file sizes in human readable format. Size of the file is very difficult to read when displayed in terms of byte. The (ls -lh)command will give you the data in terms of Mb, Gb, Tb, etc.
ls -lh यह आदेश आपको मानव पठनीय प्रारूप में फ़ाइल आकार दिखाएगा। बाइट के संदर्भ में प्रदर्शित होने पर फ़ाइल का आकार पढ़ना बहुत कठिन होता है। (ls -lh)कमांड आपको एमबी, जीबी, टीबी, आदि के संदर्भ में डेटा देगा।
ls -lhS If you want to display your files in descending order (highest at the top) according to their size, then you can use (ls -lhS) command.
ls -lhS यदि आप अपनी फ़ाइलों को उनके आकार के अनुसार अवरोही क्रम (शीर्ष पर उच्चतम) में प्रदर्शित करना चाहते हैं, तो आप (ls -lhS) कमांड का उपयोग कर सकते हैं।
ls -l - -block-size=[SIZE] It is used to display the files in a specific size format. Here, in [SIZE] you can assign size according to your requirement.
s -l - -block-size=[SIZE] इसका उपयोग फाइलों को एक विशिष्ट आकार प्रारूप में प्रदर्शित करने के लिए किया जाता है। यहां [SIZE] में आप अपनी जरूरत के हिसाब से साइज असाइन कर सकते हैं।
ls -d */ It is used to display only sub-directories.
ls -d */ इसका उपयोग केवल सब-डायरेक्टरीओं को प्रदर्शित करने के लिए किया जाता है।
ls -g or ls -lG With this you can exclude column of group information and owner.
ls -g या ls -lG इसके साथ आप समूह की जानकारी और स्वामी के कॉलम को बाहर कर सकते हैं।
ls -n It is used to print group ID and owner ID instead of their names.
ls -n इसका उपयोग ग्रुप आईडी और ओनर आईडी को उनके नाम के बजाय प्रिंट करने के लिए किया जाता है।
ls --color=[VALUE] This command is used to print list as colored or discolored.
ls --color=[VALUE] इस कमांड का उपयोग सूची को रंगीन या बदरंग के रूप में प्रिंट करने के लिए किया जाता है।
ls -li This command prints the index number if file is in the first column.
ls -li यदि फ़ाइल पहले कॉलम में है तो यह कमांड इंडेक्स नंबर प्रिंट करता है।
ls -p It is used to identify the directory easily by marking the directories with a slash (/) line sign.
ls -p इसका उपयोग डायरेक्टरी को स्लैश (/) लाइन साइन के साथ चिह्नित करके आसानी से डायरेक्टरी की पहचान करने के लिए किया जाता है।
ls -r It is used to print the list in reverse order.
ls -r इसका उपयोग सूची को उल्टे क्रम में प्रिंट करने के लिए किया जाता है।
ls -R It will display the content of the sub-directories also.
ls -R यह सब-डायरेक्टरीओं की सामग्री को भी प्रदर्शित करेगा।
ls -lX It will group the files with same extensions together in the list.
ls -lX यह सूची में समान एक्सटेंशन वाली फ़ाइलों को एक साथ समूहित करेगा।
ls -lt It will sort the list by displaying recently modified filed at top.
ls -lt यह शीर्ष पर हाल ही में संशोधित फ़ाइल प्रदर्शित करके सूची को सॉर्ट करेगा।
ls ~ It gives the contents of home directory.
ls ~ यह होम डायरेक्टरी की सामग्री देता है।
ls ../ It give the contents of parent directory.
ls ../ यह मूल डायरेक्टरी की सामग्री देता है।
ls --version It checks the version of ls command.
ls --version यह ls कमांड के संस्करण की जाँच करता है।
4. cat command
cat (short for concatenate) is used to list the contents of a file on the standard output (stdout).
मानक आउटपुट (stdout) पर फ़ाइल की सामग्री को सूचीबद्ध करने के लिए कैट (संक्षिप्त) कमांड का उपयोग किया जाता है।
Example:-
$cat file.txt
Here are other uses of cat command:-
यहाँ कैट कमांड के अन्य उपयोग हैं: -
$cat > filename creates a new file
$cat > filename एक नई फ़ाइल बनाता है
$cat filename1 filename2>filename3 joins two files (1 and 2) in a new file (3)
$cat filename1 filename2>filename3 एक नई फ़ाइल (3) में दो फाइलों (1 और 2) को सम्मिलित करता है
to convert a file to upper or lower case use
फ़ाइल को अपरकेस या लोअर केस उपयोग में परिवर्तित करने के लिए,
$cat filename | tr a-z A-Z >output.txt
5. cp command
We can use the cp command to copy files from the current directory to a different directory.
वर्तमान डायरेक्टरी से किसी भिन्न डायरेक्टरी में फ़ाइलों की प्रतिलिपि (कॉपी) तैयार करने के लिए cp कमांड का उपयोग किया जाता है।
Example:-
$cp scenery.jpg /home/username/Pictures
6. mv command
The primary use of the mv command is to move files, although it can also be used to rename files.
mv कमांड का प्राथमिक उपयोग, फाइलों को स्थानांतरित करने के लिए किया जाता है, हालांकि इसका उपयोग फाइलों का नाम बदलने के लिए भी किया जा सकता है।
Example:-
$mv file.txt /home/username/Documents.
To rename files, the Linux command is -
फ़ाइलों का नाम बदलने के लिए, लिनक्स कमांड है-
$mv oldname.ext newname.ext
7. mkdir command
We can use mkdir command to make a new directory
हम नई डायरेक्टरी बनाने के लिए mkdir कमांड का उपयोग कर सकते हैं
Example:-
$mkdir Music
$mkdir Music/Newfile
8. rmdir command
If we need to delete a directory, use the rmdir command. However, rmdir only allows you to delete empty directories.
यदि हमे किसी डायरेक्टरी को हटाने की आवश्यकता है, तो rmdir कमांड का उपयोग किया जाता है। हालाँकि, rmdir आपको केवल खाली(रिक्त) डायरेक्टरीओं को हटाने की अनुमति देता है।
Example:-
$rmdir Music
9. rm command
The rm command is used to delete directories and the contents within them. If you only want to delete the directory as an alternative to rmdir use rm -r.
rm कमांड का उपयोग डायरेक्टरीओं और उनके भीतर की सामग्री को हटाने के लिए किया जाता है। यदि आप केवल rmdir के विकल्प के रूप में डायरेक्टरी को हटाना चाहते हैं तो rm -r का उपयोग करें।
Example:-
$rm Music
$rm-r Music
10. grep command
grep command lets you search through all the text in a given file.
grep कमांड आपको दी गई फ़ाइल में सभी टेक्स्ट को खोजने की सुविधा देता है।
Example:-
$grep-w hanumaan ramayan.txt
It will search for the word hanumaan in the ramayan file. Lines that contain the searched word will be displayed fully.
यह रामायण फ़ाइल में हनुमान शब्द की खोज करेगा। जिन पंक्तियों में खोजा गया शब्द है वे पूरी तरह से प्रदर्शित होंगी।
Options Description (विकल्प विवरण)
-c : This prints only a count of the lines that match a pattern
यह पैटर्न से मेल खाने वाली लाइनों की केवल एक गिनती प्रिंट करता है
-h : Display the matched lines, but do not display the filenames.
मिलान की गई पंक्तियों को प्रदर्शित करें, लेकिन फ़ाइल नामों को प्रदर्शित न करें।
-i : Ignores, case for matching
मिलान के लिए अपरकेस एवं लोअरकेस को इग्नोर करता है
-l : Displays list of a filenames only.
केवल फ़ाइल नामों की सूची प्रदर्शित करता है।
-n : Display the matched lines and their line numbers.
मिलान की गई रेखाएँ और उनकी पंक्ति संख्याएँ प्रदर्शित करें।
-v : This prints out all the lines that do not matches the pattern
यह उन सभी पंक्तियों को प्रिंट करता है जो पैटर्न से मेल नहीं खाती हैं
-e exp : Specifies expression with this option. Can use multiple times.
इस विकल्प के साथ अभिव्यक्ति निर्दिष्ट करता है। कई बार इस्तेमाल कर सकते हैं।
-f file : Takes patterns from file, one per line.
प्रति पंक्ति एक, फ़ाइल से पैटर्न लेता है।
-E : Treats pattern as an extended regular expression (ERE)
पैटर्न को एक विस्तारित नियमित अभिव्यक्ति (ईआरई) के रूप में मानता है
-w : Match whole word
पूरे शब्द का मिलान करें
-o : Print only the matched parts of a matching line,with each such part on a separate output line.
मिलान रेखा के केवल मिलान किए गए हिस्सों को प्रिंट करें, ऐसे प्रत्येक भाग के साथ एक अलग आउटपुट लाइन पर।
-A n : Prints searched line and nlines after the result.
परिणाम के बाद खोजी गई पंक्ति और n पंक्तियां प्रिंट करता है।
-B n : Prints searched line and n line before the result.
परिणाम से पहले खोजी गई पंक्ति और n पंक्तियां प्रिंट करता है।
-C n : Prints searched line and n lines after before the result.
परिणाम से पहले एवं बाद में खोजी गई लाइन और n पंक्तियां प्रिंट करता है।
11. chmod command
chmod is another Linux command, used to change the read, write, and execute permissions of files and directories.
chmod एक अन्य लिनक्स कमांड है, जिसका उपयोग फ़ाइलों और डायरेक्टरीओं की पढ़ने, लिखने और निष्पादन अनुमतियों को बदलने के लिए किया जाता है।
r Permission to read the file.
r फ़ाइल पढ़ने की अनुमति।
w Permission to write (or delete) the file.
w फ़ाइल लिखने (या हटाने) की अनुमति।
x Permission to execute the file, or, in the case of a directory, search it.
x फ़ाइल को निष्पादित करने की अनुमति, या, निर्देशिका के मामले में, इसे खोजें।
Reference Class Description
u owner file's owner
(फ़ाइल का स्वामी)
g group users who are members of the file's group
(उपयोगकर्ता जो फ़ाइल के समूह के सदस्य हैं)
o others users who are neither the file's owner nor members of the file's group
(उपयोगकर्ता जो न तो फाइल के मालिक हैं और न ही फाइल के समूह के सदस्य हैं)
a all All three of the above, same as ugo
(उपरोक्त तीनों, ugo के समान)
Operator Description
+ Adds the specified modes to the specified classes
निर्दिष्ट मोड को निर्दिष्ट वर्गों में जोड़ता है
- Removes the specified modes from the specified classes
निर्दिष्ट वर्गों से निर्दिष्ट मोड को हटा देता है
= The modes specified are to be made the exact modes for the specified classes
निर्दिष्ट मोड को निर्दिष्ट वर्गों के लिए सटीक मोड बनाया जाना है
The following table represents the digits and their permissions:
Digits Permissions
000 No permission कोई अनुमति नहीं
001 Execute permission अनुमति निष्पादित करें
010 Write permission अनुमति लिखें
011 Write and execute permissions अनुमतियाँ लिखें और निष्पादित करें
100 Read permission पढ़ने की अनुमति
101 Read and execute permissions अनुमतियाँ पढ़ें और निष्पादित करें
110 Read and write permissions पढ़ने और लिखने की अनुमति
111 Read, write, and execute permissions अनुमतियाँ पढ़ें, लिखें और निष्पादित करें
Syntax:-
chmod <options> <permissions> <file name>
Example:-
$chmod -rw-rw-r-- sam sam newclient.c
777 - all can read/write/execute (full access).
12. echo command
echo command in Linux is used to display line of text/string that are passed as an argument . This is a built in command that is mostly used in shell scripts and batch files to output status text to the screen or a file.
लिनक्स में इको कमांड का उपयोग टेक्स्ट/स्ट्रिंग की लाइन प्रदर्शित करने के लिए किया जाता है जो एक तर्क के रूप में पारित किया जाता है। यह एक बिल्ट इन कमांड है जिसका उपयोग ज्यादातर शेल स्क्रिप्ट और बैच फाइल में स्क्रीन या फाइल में स्टेटस टेक्स्ट को आउटपुट करने के लिए किया जाता है।
Syntax-
echo [option] [string]
Example-
$echo "hello world"
output - hello world
$ x=10
You can print the value of variable x by executing the command
आप कमांड चलाकर वेरिएबल x की वैल्यू प्रिंट कर सकते हैं
$echo The value of x is $x
Output- The value of x is 10
This command is also used to move some data into a file.
इस कमांड का उपयोग डेटा को फाइल में ले जाने के लिए भी किया जाता है।
Example-
$echo Hello, my name is John >> name.txt
13. who
The who command gives the information about the users logged on to the system.
who कमांड सिस्टम में लॉग ऑन किए गए उपयोगकर्ताओं के बारे में जानकारी देता है।
The who command displays the following information for each user currently logged in to the system if no option is provided :
सिस्टम में वर्तमान में लॉग इन किए गए प्रत्येक उपयोगकर्ता के लिए who कमांड निम्नलिखित जानकारी प्रदर्शित करता है यदि इसके साथ कोई विकल्प प्रदान नहीं किया जाता है:-
1. Login name of the users उपयोगकर्ताओं का लॉगिन नाम
2. Terminal line numbers टर्मिनल लाइन नंबर
3. Login time of the users in to system सिस्टम में उपयोगकर्ताओं का लॉगिन समय
4. Remote host name of the user उपयोगकर्ता का रिमोट होस्ट नाम
Syntax:-
$who [option] [filename]
Example:-
$who
13.1 ) who am i
This command displays the information about the current user only.
यह कमांड केवल वर्तमान उपयोगकर्ता के बारे में जानकारी प्रदर्शित करता है।
Example:-
$whoami
