Kwinqaku elilandelayo siza kujonga kwi-Prettyping. Ndicinga ukuba kuyaziwa kwihlabathi liphela ukuba umthetho we-ping usetyenziselwa ukuqinisekisa ukuba ngaba umgcini ekujoliswe kuye uyafikeleleka okanye hayi. Sisebenzisa i-Ping command, singathumela i-ICMP echo yesicelo kwi-host host yethu kwaye sijonge ukuba ngaba umgcini wethagethi uphezulu okanye uhle. Ukuchwetheza kulungile isisongelo sesixhobo somgangatho oqhelekileyo. Yenza imveliso yomyalelo we-ping ibe nomtsalane ngakumbi, ifundeke lula, inemibala, kwaye icwecwe. Esi sisongelo siya kuqhuba umthetho oqhelekileyo we-ping ngasemva kwaye usibonise imveliso enemibala kunye nabalinganiswa be-Unicode.
Yiyo isixhobo esivulelekileyo simahla nesibhaliweyo Bash kwaye awk. Iyahambelana noninzi lweenkqubo ezisebenza njenge-Unix, ezinje ngeGnu / Linux, FreeBSD, kunye neMac OSX. Ukuzikhethela akusetyenziswanga kuphela ukwenza ukuphuma komyalelo we-ping, kodwa kuza nezinye izinto ezipholileyo.
Iimpawu ngokubanzi zohlobo lokuchwetheza
- Khangela iipakethi ezilahlekileyo kwaye ubamakishe ekuphumeni.
- Umzekelo manani aphilayo. Izibalo zihlaziywa rhoqo emva kokuba impendulo nganye ifunyenwe, ngelixa i-ping iboniswa kuphela emva kokugqitywa.
- Uya kuyazi indlela yokuphatha 'imiyalezo engaziwayo' njengemiyalezo yempazamo ngaphandle kokuxinanisa imveliso.
- Kuphephe ukuprinta imiyalezo ephindaphindwayo.
- Siza kukwazi sebenzisa iiparameter eziqhelekileyo zeping Ngokuchwetheza.
- Inokuqhutywa njenge umsebenzisi oqhelekileyo.
- Ndiyakwazi Phinda uthumele imveliso kwifayile.
- Akukho fakelo olufunekayo. Khuphela nje i-binary, yenze isebenze, kwaye usebenze.
- Es ngokukhawuleza kunye nokukhanya kwaye yenza imveliso ibe lula kakhulu ukuba ifundwe, inemibala, kwaye inomdla kakhulu.
Ukufakelwa kokuthayipha kwangaphambili
Njengoko sele ndibhalile, Ukuzilungiselela kwangaphambili akufuneki nakuphi na ukufakela. Kufuneka nje khuphela ifayile yokubini. Ukwenza oku sivula i-terminal (Ctrl + Alt + T) kwaye sisebenzise lo myalelo ulandelayo:
curl -O https://raw.githubusercontent.com/denilsonsa/prettyping/master/prettyping
Emva kokukhuphela, siya kuthi hambisa ifayile yokubini kwi $ PATH yakho. Umzekelo / usr / yendawo / ibini.
sudo mv prettyping /usr/local/bin
Emva kwale, yenze isebenze ngoku Landelayo:
sudo chmod +x /usr/local/bin/prettyping
Kwaye oku kulungele ukusetyenziswa.
Sebenzisa i-Prettyping
Nje ukuba ifumaneke, ngoku Singabamba nayiphi na inginginginya okanye idilesi ye-IP kwaye ujonge iziphumo zomyalelo we-ping. Ukwenza oku siza kubhala kwisiphelo sendlela (Ctrl + Alt + T):
prettyping ubunlog.com
Ukuba siyaphumeza Ukuchwetheza ngaphandle kwengxoxo, kuya kuqhubeka kuqhuba de siyeke ngesandla ngokucinezela Ctrl + c.
Nciphisa inani leeping
Njengoko bendiphawulile ngaphambili, kuba ukukhetha ubuchwephesha yinto esongelayo yomyalelo we-ping, izakusivumela ukuba sisebenzise ezona paramitha ziqhelekileyo ze-ping. Umzekelo, sinokusebenzisa i- -c ukhetho Ukubamba umphathi kuphela inani elichaziweyo lamaxesha, umzekelo 4:
prettyping -c 4 ubunlog.com
Susa umbala kwimveliso
Ngokuzenzekelayo, i-prettynping iya kusibonisa iziphumo kwifomathi yombala. Ukuba emva kokuzama, uyabona ukuba awuyithandi le ndlela, kufuneka uyenze Sebenzisa i –Ukhetho lwenkqubo.
prettyping --nocolor ubunlog.com
Ngokufanayo, siya kuba nakho ukwenza njalo sebenzisa umbala omnye kuphela kunye -Nomulticolor ukhetho:
prettyping --nomulticolor ubunlog.com
Khubaza abalinganiswa be-Unicode
Ukukhubaza oonobumba be-Unicode, sebenzisa Ukhetho lwegama:
prettyping --nounicode ubunlog.com
Oku kunokuba luncedo ukuba i-terminal yakho ayixhasi i-UTF-8.
Phinda uhambise imveliso kwifayile
Kwakhona siya kukwazi ukuhambisa imveliso kwifayile. Lo myalelo ulandelayo uya kubhala imveliso yomyalelo omhle ubunlog.com kwifayile ubunlog.txt.
prettyping ubunlog.com | tee ubunlog.txt
Olunye ukhetho lokuchwetheza
Ukuzilungiselela ukukhetha ezinye iindlela ezinokusinceda xa sisenza imisebenzi enje:
- Yenza / khubaza ilivo yangasemva. (okungagqibekanga ngu: kuvunyelwe).
- Ukunyanzeliswa kwemveliso eyilelwe i-terminal. (okungagqibekanga: ngokuzenzekelayo).
- Sebenzisa ii'''ing pings zokugqibela kumgca-manani. (emiselweyo: 60).
- Bhala ngaphezulu ukufunyanwa okuzenzekelayo kwemilinganiselo yesiphelo.
- Ngaphezulu kwetoliki ye-awk. (okungagqibekanga: awk).
- Ngaphezulu kwesixhobo se-ping. (okungagqibekanga: ping).
Uncedo
Ukwazi ngakumbi malunga nale sicelo, unga qhagamshelana necandelo loncedo:
prettyping --help
Nathi sinako ukwenjenjalo yazi ngakumbi kwi iphepha lewebhu yeprojekthi okanye kwindawo yokugcina izinto GitHub.