سطر الأوامر
في هذه الصفحة 8 موضوعات
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
نظرة عامة
الموضوعات
- الطرفية (Terminal)
- الصدفة (shell)
- المجلدات
- أوامر الملفات
- المسارات
- الصلاحيات
- متغيرات البيئة
- الأنابيب (pipes)
- إعادة التوجيه
- أساسيات Bash/PowerShell
تعلّم أولًا
88 دقيقة قراءة · 3 ساعة تدريب (تقدير)
مخرجات التعلم
- Navigate directories with absolute and relative paths (
pwd,cd,ls/dir). - Create, copy, move, and delete files and folders from the terminal.
- Use pipes and redirection to filter output and save it to a file.
- Read and set an environment variable for the current session in Bash and PowerShell.
- Explain file permissions at a basic level and why a script may fail to execute.
الدروس
- 01الطرفية والصدفة ومحث الأوامر12 د قراءة
- 02المسارات: المطلق والنسبي والرئيسي و. و..11 د قراءة
- 03التعامل مع الملفات والمجلدات10 د قراءة
- 04الأنابيب وإعادة التوجيه10 د قراءة
- 05متغيرات البيئة في الصدفة11 د قراءة
- 06أساسيات الصلاحيات12 د قراءة
- 07ورقة مرجعية: Bash مقابل PowerShell11 د قراءة
- 08عرض عملي: إعداد مجلد مشروع باستخدام الطرفية فقط11 د قراءة
المختبر والتمارين
Lab
BEG-006-LAB1 · Terminal-only project setup
Outcomes: 1–5 · Time: ~2 h Using only the terminal: create a project folder structure, create files, list them sorted by size, save the listing to a file, and search it for a word. Acceptance: a command history file plus the final folder tree.
Exercises
| ID | Outcome | Task |
|---|---|---|
| BEG-006-EX01 | 1 | From your home folder, go into Documents, then back up two levels using relative paths. |
| BEG-006-EX02 | 1 | Print your current folder, then the same location as an absolute path. |
| BEG-006-EX03 | 2 | Create a/b/c, create a file in c, copy it to b, move the original to a. |
| BEG-006-EX04 | 2 | Delete the whole a folder you made, after checking where you are. |
| BEG-006-EX05 | 3 | Save a folder listing to list.txt and show only the lines containing a chosen word. |
| BEG-006-EX06 | 4 | Set a variable COURSE=java for this session and print it. |
| BEG-006-EX07 | 5 | Make a script file executable and run it. What happens before and after? |
أظهر الحلول
- EX01
cd Documentsthencd ../... - EX02
pwd(Bash) orGet-Location(PowerShell). - EX03
mkdir -p a/b/c; touch a/b/c/f.txt; cp a/b/c/f.txt a/b; mv a/b/c/f.txt a. - EX04
pwdfirst, thenrm -r a. - EX05
ls > list.txtthengrep word list.txt. - EX06
export COURSE=java; echo $COURSE(PowerShell:$env:COURSE = "java"; $env:COURSE). - EX07 Before: "Permission denied". After
chmod +x script.sh: it runs.
الاختبار
Outcomes: O1 paths · O2 files · O3 pipes · O4 variables · O5 permissions.
اختبار ذاتي لك: لا توجد درجات، ولا يُحفظ أو يُرسل أي شيء. اختر إجابة ثم تحقق منها، ويمكنك المحاولة مرة أخرى كما تشاء.
الجزء العملي
Timed terminal task: 10 commands (navigate, create, copy, move, redirect, filter, set a variable) with no GUI use, 15 minutes. Pass: at least 8 of 10 correct.
أخطاء شائعة
Spaces in paths without quotes; running rm/del without checking the current directory; mixing Bash and PowerShell syntax.
التقييم
Timed terminal task (10 commands) with no GUI use.
الصلة بالمسار الوظيفي
Daily tool from here on; deepened in JNR-048.