Creating and changing directories लिनक्स , removing files and directories in Linux in hindi

Linux mein directories (folders) create karna, change karna, files aur directories ko remove karna, basic command line tasks hote hain. Yeh commands Linux ke terminal ya command line interface (CLI) se execute ki jati hain. Niche kuch common Linux commands diye gaye hain:

  1. Directories (Folders) Create Karna:
  • mkdir: Directory create karne ke liye mkdir command ka istemal hota hai. Example: mkdir my_directory my_directory naam ka ek naya directory create karega.
  1. Directories Change Karna:
  • cd: Directory change karne ke liye cd command ka istemal hota hai. Example: cd my_directory my_directory mein jaane ke liye use kiya jata hai.
  1. Files Aur Directories Remove Karna:
  • rm: Files aur directories ko remove karne ke liye rm command ka istemal hota hai.
    • rm file.txt: file.txt ko remove karega.
    • rm -r my_directory: my_directory aur uske contents ko recursive tareeke se remove karega.
  1. Directories Ko Empty Kar Dena:
  • rm -r directory_name/*: Directory_name ke contents ko remove kar dega, lekin directory ko khud nahi hatayega.
  1. Directory Structure Dekhna:
  • ls: Current directory ke contents ko dekhne ke liye ls command ka istemal hota hai.

Yeh commands Linux mein commonly istemal hoti hain aur inka istemal directories aur files ko manage karne ke liye hota hai. Hamesha dhyan rahe ki files ya directories ko remove karte waqt sawdhani bartav se kare, kyun ki yeh irreversible ho sakta hai aur data nuksan ho sakta hai.

Certainly! Niche kuch Linux commands ke examples diye gaye hain:

  1. Directories (Folders) Create Karna: mkdir: Directory create karne ke liye mkdir command ka istemal hota hai. Example:
   mkdir my_directory

Is command se “my_directory” naam ka ek naya directory create hoga.

  1. Directories Change Karna: cd: Directory change karne ke liye cd command ka istemal hota hai. Example:
   cd my_directory

Is command se “my_directory” mein ja sakte hain.

  1. Files Aur Directories Remove Karna: rm: Files aur directories ko remove karne ke liye rm command ka istemal hota hai. Example:
   rm file.txt

Is command se “file.txt” ko remove kar diya jayega.

  1. Directories Ko Empty Kar Dena: rm -r directory_name/*: Directory_name ke contents ko remove kar dega, lekin directory ko khud nahi hatayega. Example:
   rm -r my_directory/*

Is command se “my_directory” ke sabhi contents ko remove kar diya jayega, lekin “my_directory” directory khud bani rahegi.

  1. Directory Structure Dekhna: ls: Current directory ke contents ko dekhne ke liye ls command ka istemal hota hai. Example:
   ls

Is command se current directory ke contents list kiya jayega.

In examples mein, aap commands ko dekh kar samajh sakte hain kaise directories aur files create, change aur remove kiye jate hain.

Leave a Comment