Basic Linux Imiyalo on Linux kanye Windows Operating Systems

Lombhalo kuyasiza nalabo abafisa ukuqalisa Linux imiyalo. Lapha uzothola imiyalo ejwayelekile kakhulu asetshenziswe Linux.

Uma ungathanda ukusebenzisa Linux imiyalo Windows ke ukufaka Cygwin. Cygwin kuyinto Linux ungqimba on top of Windows evumela ukuthi wena ukuba usebenzise Linux ayala Windows.

Uma ufake Cygwin on Windows ke endleleni ezenzakalelayo lapho uqala ukuphela Cygwin kuyoba:

C:\cygwin64\home\{username}

 

Dala isibonelo entsha ifayela incwajana

touch textfile.txt

 

Shintsha lwemibhalo

cd {directory path\name}

 

Uhlu lwemibhalo okuqukethwe in format eside ( -l ) kuhlanganise amafayela ezifihliwe lwemibhalo ( -a )

ls -l -a

ls -al

 

Oda amafayela kanye amalayelo by ngesikhathi wokugcina modified

ls -t

 

Uhlu lwemibhalo ikhefu futhi uphenye

ls -l | less

 

Bonisa indawo yamanje (ukuphrinta ukusebenza lwemibhalo)

pwd

 

Okukhishwa last 100 amazwi ifayela

tail -100 {filename.extension}

 

Khipha kuqala 100 imigqa of a ifayela

head -100 {filename.extension}

 

Kopisha ifayela

cp {source} {destination}

 

Move ifayela

mv {source} {destination}

 

Yenza lwemibhalo entsha

mkdir {new directory name}

 

Susa ifayela

rm {filename}

 

Susa i directory engenalutho

rmdir {directory to remove}
rm -d{directory to remove}

 

Susa lwemibhalo futhi ekuqukethe

rm -r {directory to remove}
rm -R{directory to remove}

 

Hlunga okuqukethwe ifayela

sort {filename to sort}

 

Susa okufakiwe ngeduplikhethi ifayela

uniq {filename to remove duplicates}

 

Cindezela amafayela

gzip {filename}

 

Cindezela lwemibhalo

gzip -r {directory name}

 

Bala inani imigqa namazwi ifayela umbhalo

wc {filename}

 

Ukucinga umbhalo ngaphakathi amafayela zokufanisa string iphethini (iyazwela kofeleba)

grep 'word' {filename}

 

Ukucinga umbhalo ngaphakathi amafayela zokufanisa string iphethini (icala bangakhathaleli muntu)

grep -i 'word' {filename}

 

Ukucinga nge lwemibhalo

grep -R Arctic /home/ccuser/workspace/geography

 

Bonisa okuqukethwe ifayela umbhalo

cat

 

stream Umhleli SED (efanayo ukuthola futhi buyisela)

sed 's/snow/rain/' forests.txt

 

Shintsha izimvume ifayela futhi lwemibhalo

chmod {options} {permissions} {filename}

 

Bala imiyalo yamuva esetshenziswa

history

 

Ukuhlela ngokuzenzakalela imisebenzi

cron
crontab

 

Izimvume Shintsha ifayela

chmod {permission number} {some file or directory}
chmod 777 /storage

 

Shintsha izimvume ifayela recursive

chmod -R {permission number} {some file or directory}

 

 

Shiya impendulo