{"id":26045102,"url":"https://github.com/yosef-alsabbah/linux-directory-management","last_synced_at":"2025-08-12T01:21:14.211Z","repository":{"id":280798136,"uuid":"943204485","full_name":"Yosef-AlSabbah/Linux-Directory-Management","owner":"Yosef-AlSabbah","description":"This repository contains a Linux-based directory management assignment where various commands are used to manipulate files and directories in a structured manner. The goal is to practice and demonstrate proficiency in essential Linux commands like `mkdir`, `mv`, `cp`, `ls`, `cat`, and more.","archived":false,"fork":false,"pushed_at":"2025-03-05T10:45:26.000Z","size":8120,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-30T06:40:07.478Z","etag":null,"topics":["bash","cli-commands","file-system","linux","terminal"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yosef-AlSabbah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-05T10:29:44.000Z","updated_at":"2025-06-20T07:34:48.000Z","dependencies_parsed_at":"2025-03-05T11:42:55.444Z","dependency_job_id":null,"html_url":"https://github.com/Yosef-AlSabbah/Linux-Directory-Management","commit_stats":null,"previous_names":["yosef-alsabbah/linux-directory-management"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Yosef-AlSabbah/Linux-Directory-Management","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yosef-AlSabbah%2FLinux-Directory-Management","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yosef-AlSabbah%2FLinux-Directory-Management/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yosef-AlSabbah%2FLinux-Directory-Management/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yosef-AlSabbah%2FLinux-Directory-Management/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yosef-AlSabbah","download_url":"https://codeload.github.com/Yosef-AlSabbah/Linux-Directory-Management/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yosef-AlSabbah%2FLinux-Directory-Management/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269983030,"owners_count":24507510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","cli-commands","file-system","linux","terminal"],"created_at":"2025-03-07T19:31:30.111Z","updated_at":"2025-08-12T01:21:14.169Z","avatar_url":"https://github.com/Yosef-AlSabbah.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🖥️ Linux Directory Management - OS Lab\n\n## 📌 Overview\nThis repository contains a Linux-based directory management assignment where various commands are used to manipulate files and directories in a structured manner. The goal is to practice and demonstrate proficiency in essential Linux commands like `mkdir`, `mv`, `cp`, `ls`, `cat`, and more.\n\n## 👩‍🏫 Instructor: Malak Ghabayen\n\n## 🏷️ Tags\n- Linux\n- Bash\n- File System\n- Terminal\n- CLI Commands\n\n---\n\n## 📂 Directory Structure\n```\n/home/OS/Lab1/\n├── Archive/\n├── Customer/\n├── Finance/\n│   ├── Cust1.txt\n│   ├── Cust2.txt\n│   └── Cust3.txt\n└── Public/\n    ├── Forms/\n    └── Info/\n        └── Leave.txt\n```\n\n---\n\n## 🛠️ Commands Used\n| Command  | Description |\n|----------|------------|\n| `mkdir`  | Creates directories |\n| `cd`     | Changes directory |\n| `cd ..`  | Moves to the parent directory |\n| `mv`     | Moves or renames files/directories |\n| `cp`     | Copies files/directories |\n| `ls`     | Lists files and directories |\n| `cat`    | Displays file content |\n| `clear`  | Clears the terminal screen |\n| `exit`   | Exits the terminal session |\n\n---\n\n## 📜 Implementation Steps\n\n### 🏗️ Step 1: Create Directory Structure\n```bash\nmkdir -p OS/Lab1/{Finance,Customer,Public/{Forms,Info},Archive} \u0026\u0026 \\\ncd OS/Lab1 \u0026\u0026 \\\ntouch Finance/{Cust1.txt,Cust2.txt,Cust3.txt} \\\n      Public/Info/Leave.txt\n```\n📌 **Check Structure:**\n```bash\ntree\n```\n```\n.\n├── Archive\n├── Customer\n├── Finance\n│   ├── Cust1.txt\n│   ├── Cust2.txt\n│   └── Cust3.txt\n└── Public\n    ├── Forms\n    └── Info\n        └── Leave.txt\n```\n\n---\n\n### 🔄 Step 2: Move Customer Files to `Customer/`\n```bash\nmv Finance/* Customer\ntree\n```\n```\n.\n├── Archive\n├── Customer\n│   ├── Cust1.txt\n│   ├── Cust2.txt\n│   └── Cust3.txt\n├── Finance\n└── Public\n    ├── Forms\n    └── Info\n```\n\n---\n\n### 📂 Step 3: Copy Customer Files to `Archive/`\n```bash\ncp Customer/* Archive\ntree\n```\n```\n.\n├── Archive\n│   ├── Cust1.txt\n│   ├── Cust2.txt\n│   └── Cust3.txt\n├── Customer\n│   ├── Cust1.txt\n│   ├── Cust2.txt\n│   └── Cust3.txt\n├── Finance\n└── Public\n    ├── Forms\n    └── Info\n```\n\n---\n\n### 📝 Step 4: Move `Leave.txt` and Rename it to `leave_old.txt`\n```bash\nmv Public/Info/Leave.txt Archive/leave_old.txt\ntree\n```\n```\n.\n├── Archive\n│   ├── Cust1.txt\n│   ├── Cust2.txt\n│   ├── Cust3.txt\n│   └── leave_old.txt\n├── Customer\n│   ├── Cust1.txt\n│   ├── Cust2.txt\n│   └── Cust3.txt\n├── Finance\n└── Public\n    ├── Forms\n    └── Info\n```\n\n---\n\n### 📁 Step 5: Move `leave_old.txt` to `Forms/`\n```bash\nmv Archive/leave_old.txt Public/Forms/\ntree\n```\n```\n.\n├── Archive\n│   ├── Cust1.txt\n│   ├── Cust2.txt\n│   ├── Cust3.txt\n├── Customer\n│   ├── Cust1.txt\n│   ├── Cust2.txt\n│   └── Cust3.txt\n├── Finance\n└── Public\n    ├── Forms\n    │   └── leave_old.txt\n    └── Info\n```\n\n---\n\n### ✅ Step 6: Verify Files in `Customer/` and `Archive/`\n```bash\ncd Customer \u0026\u0026 tree\n```\n```\n.\n├── Cust1.txt\n├── Cust2.txt\n└── Cust3.txt\n```\n```bash\ncd ../Archive \u0026\u0026 tree\n```\n```\n.\n├── Cust1.txt\n├── Cust2.txt\n└── Cust3.txt\n```\n\n---\n\n### 🗑️ Step 7: Delete Files in `Customer/`\n```bash\ncd ../Customer/ \u0026\u0026 rm *\ntree\n```\n```\n.\n(empty)\n```\n\n---\n\n### 📜 Step 8: Display Contents of Text Files\n```bash\ncd ../ \u0026\u0026 cat {Archive,Public/Forms}/*.txt\n```\n```\nDear Instructor, I promise I didn’t use ChatGPT for this... or did I? 😏\nI worked so hard, even my laptop cried. Please reward me with a 100%! 🥺\nIf I don’t get 100%, my pet rock will be very disappointed. 🪨\nP.S. I’ll name my firstborn after you if you give me full marks. Deal? 🤝\n```\n\n---\n\n### 🔄 Step 9: Clear Screen \u0026 Exit (Do it Yourself 😉)\n```bash\nclear\nexit\n```\n\n---\n\n## 🎯 Conclusion\nThis lab covers essential file system commands in Linux, providing hands-on experience with directory structures, file movement, copying, renaming, deletion, and file content display. This structured approach helps in understanding hierarchical file management in Linux environments.\n\n---\n\n### 🌟 Happy Coding! 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyosef-alsabbah%2Flinux-directory-management","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyosef-alsabbah%2Flinux-directory-management","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyosef-alsabbah%2Flinux-directory-management/lists"}