Creating and removing · إنشاء وحذف
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · تحتاج هذه الصفحة إلى متصفح حديث (يدعم SharedArrayBuffer). يرجى تحديث Chrome أو Edge أو Firefox أو Safari إلى أحدث إصدار.
English
Making things
mkdirmakes a directory;touchmakes an empty file:
- After these, you have a
notesfolder with an emptytodo.txtinside it.
العربية
إنشاء أشياء
- أمر
mkdirينشئ مجلداً؛ أمرtouchينشئ ملفاً فارغاً:
mkdir notes
touch notes/todo.txt
- بعد هذين الأمرين، سيكون لديك مجلد
notesبداخله ملف فارغtodo.txt.
English
Copying and moving
cpcopies a file;mvmoves (or renames) it:
mv old newis also how you rename something — moving it to a new name.
العربية
النسخ والنقل
- أمر
cpينسخ ملفاً؛ أمرmvينقل (أو يعيد تسمية) ملفاً:
cp hello.txt backup.txt
mv backup.txt notes/backup.txt
- أمر
mv old newهو أيضاً الطريقة التي تعيد بها تسمية شيء ما — بنقله إلى اسم جديد.
English
Removing — carefully
rmremoves a file. To remove a folder and everything in it, add-r(recursive):
- ⚠️ There is no recycle bin on the command line.
rmis permanent — always check before you delete.
العربية
الحذف — بحذر
- أمر
rmيحذف ملفاً. لحذف مجلد وكل ما بداخله، أضف-r(تكراري):
rm backup.txt
rm -r notes
- ⚠️ لا يوجد سلة المهملات في سطر الأوامر. أمر
rmدائم — تحقق دائماً قبل الحذف.
English
Common mistakes
rmdeletes for good — there is no recycle bin.mkdirmakes a folder;rmdironly removes an empty one.
العربية
أخطاء شائعة
- أمر
rmيحذف نهائياً — لا توجد سلة مهملات. - أمر
mkdirينشئ مجلداً؛ أمرrmdirيحذف فقط مجلداً فارغاً.
Explore · استكشف
Folders and files · المجلدات والملفات
mkdir / touch add to the tree; cd moves where you are. · mkdir / touch يضيف للشجرة؛ cd ينقل مكانك.
Make a new folder called notes with mkdir notes. The check then lists the folder to confirm it appeared. · أنشئ مجلداً جديداً اسمه notes باستخدام mkdir notes. التحقق afterward يسرد المجلد للتأكد من ظهوره.
Make a copy of hello.txt named backup.txt using cp. · انسخ hello.txt باسم backup.txt باستخدام cp.