DEV Community

Mohira21
Mohira21

Posted on

Terminal komandalar | Part 2

cd ~

  • home papkaga qaytadi

cd ~/papka nomi

  • har qanday papkadan shu papkaga o'tadi

open . yoki start .

  • file explorerda shu papkani ochadi

mkdir

mkdir papka-nomi yoki mkdir 'papka-nomi'

  • yangi papka ochadi
  • agar papka nomi probel bilan yozilsa alohida-alohida papka ochadi

echo salom >> salom.txt

  • joriy papkada text fayl ochadi

echo "bugun havo yaxshi" >> salom.txt

  • tekstga yangi so'z/gap qo'shiladi

rm (remove)

rm salom.txt

  • har qanday faylni o'chiradi (papkani emas)

rm -r (recursion)

  • har qanday papka va uning ichidagi barcha narsani o'chiradi

rm -rf (force)

  • o'chmayotgan faylni yoki pakani majburlab o'chirib yuborsa bo'ladi ! Bu komanda orqali o'chirilgan fayl va papkalar korzinkaga tushmaydi!

date

  • bu komanda hozirgi vaqtni chop etish uchun ishlatiladi

date

  • Sat Apr 24 10:11:25 + 04 2022 ko'rinishida sanani chop etadi

date '+%d-%m-%Y'

  • sanani dd-mm-yyyy formatda chop etadi 24-0 4-2022

date '+%d/%m/%Y'

  • 24/04/2022 ni chop etadi

mkdir $(date)

  • bugungi sana bilan papka ochadi (faqat sana,oy,yil,... alohida alohida papka bo'lib ochiladi)

mkdir $(date '+%d/%m/%Y')

  • bugungi sana bilan paka yaratadi 24/04/2022 ko'rinishida

Top comments (0)