Command line

មូលស្ថានគ្រីះប្រើ Shortcut នៅក្នុង command

Shortcut Function
Ctrl + A ទៅដើមបន្ទាត់
Ctrl + E ទៅចុងបន្ទាត់
Ctrl + U លុបទាំងអស់ (ពីដើមដល់ cursor)
Ctrl + K លុបចាប់ពី cursor ដល់ចុងបន្ទាត់
Ctrl + W លុបពាក្យមុន cursor
Ctrl + Y Paste វិញអ្វីដែលបានលុប
⬆ (Arrow keys) Scroll មើល command ចាស់
⬇ (Arrow keys) Scroll មើល command ថ្មីវីញ
ប្រើ History Command

ប្រសិនបើអ្នកចង់មើល ប្រវត្តិពាក្យបញ្ជា ដែលបានប្រើ:

history

បន្ទាប់មកអ្នកអាចប្រើ Arrow Keys ឬ ! ដើម្បីប្រើវិញ:

!123   # រៀបលេខ 123 ជាការបញ្ជាក្នុង history
ប្រើ fc Command (Linux/macOS)

បើអ្នកចង់កែសម្រួល last command ក្នុង text editor:

fc

វាបើក editor ឲ្យអ្នកកែបន្ទាត់ command ហើយចុច Save & Exit ដើម្បីប្រើវា។

Note:Ctrl + A / E → Jump to Start/End


យើងចង់ប្រើ command line កុំព្យូទ័រសម្រាប់ធ្វើអ្វីមួយ ឬមួយយើងសិក្សាជាមួយ Node js វាត្រូវការចេះប្រើ command line ។

Command Meaning Stand for
cl --help example rm --help Help to about command line
pwd explore every thing Print working directory
cd Go to a folder (cd Desktop) Change directory
ls Show all our local (folder)s Lists everything
ls -al Show all files our local Users Lists everything all
mkdir Create new folder(mkdir folder) Makes a new directory
touch Creating new files(touch index.html)
rm Remove file (rm index.html) remove
rm -r Remove folder (rm -r myfolder) remove folder
rm * Remove all files in folder(rm *) remove all
rmdir Remove empy folder remove an empty directory
cp -r copy folder1 to folder2 (cp -r folder1 folder2) copy
open open file or folder example open Desktop
mv move folder1 to folder2 (mv folder1 folder2) move
control + c abort the current task and regain user control

នៅពេលយើង command line pwd នោះវានឹងឈរនៅទីតាង Users ឈ្មោះកុំព្យូទ័ររបស់យើង

Editor command line

  • vim
  • nano


    ប្រើ vim
     vim filename
  • i = insert គឺថាយើងអាចបញ្ចូលអក្សរបាន
  • យើងឈប់សរសេរចុច esc keyboard
  • :wq! = write and quick សរសេរហើយបិទកម្មវិធី
  • Post a Comment

    0 Comments