10-ka Amar ee ugu sarreeya Mac Terminal waa inaad ogaataa

Terminalka(Terminal) Mac waa mid si cajiib ah u awood badan. Ma aha oo kaliya in ay u ogolaato in arrimuhu si dhakhso ah u dhacaan iyada oo aan GUI (isticmaalka garaafyada) hoos u dhigin, waxay sidoo kale kuu ogolaaneysaa inaad qabato hawlo aanad si kale u dhamaystirin. Si kastaba ha ahaatee, uma baahnid inaad noqoto khabiir Terminal -ama xitaa sida isticmaalka turjubaanada khadka-taliyaha-si aad uga faa'iidaysato.

Haddii aad gebi ahaanba ku cusub tahay Terminalka(Terminal) ama aad kuleylayso, liiska 10ka Mac Terminal amarada hoose waa inay kaa caawiyaan inaad horumariso khibradaada Mac kaaga . Waxaad ku fulin kartaa dhowr ilbiriqsi gudahood.

Xitaa haddii aad taqaano dariiqaaga agagaarka Terminalka(Terminal) , waxaa laga yaabaa inaad weli ku dhex ordo amarka qallafsan ee ku hoos dhacay radar kaaga oo dhan. Markaa sii wad akhrinta.

1. Mac kaaga soo jeed

Xusuusnow(Remember) markii ugu dambeysay ee Mac kaaga uu seexday oo uu ku dhammaaday hakadka ama baabi'inta soo dejintaas-ama wax kasta oo kale-uu qabanayay? Haddii aad necbahay wax ka beddelka goobaha hurdada mar kasta oo aad rabto inaad taas joojiso, si fudud u dab Terminal oo socodsii amarka Mac Terminal ee(Mac Terminal) hoose:

maadada Caffeinate(caffeinate)

Mac -gaagu ma seexan doono ilaa inta daaqada Terminalku sii furnaato. (Terminal)Waxa kale oo aad ka hortagi kartaa in Mac uu seexdo(prevent the Mac from falling asleep) wakhti go'an oo keliya adiga oo ku daraya -t <time in seconds> dood — tusaale, kaffeinate -t ​​3600(caffeinate -t 3600) .

2. Beddel qaabka sawirka

Sida caadiga ah, Mac -gaagu wuxuu ku kaydiyaa sawiradaada qaabka PNG . Laakin taas waxaad u bedeli kartaa qaabka fudud ee JPG adigoo raacaya amarka hoose:

defaults waxay qoraan com.apple.screencapture nooca JPG(defaults write com.apple.screencapture type JPG)

Intaa waxaa dheer, waxaad isticmaali kartaa isla amar si aad ugu beddesho qaabab kale sida TIFF , BMP , iyo PSD . Kaliya(Just) ku beddel JPG (dhammaadka) sawirka fidinta ee aad rabto.

3. Websaydhada iyo Aaladaha Ping

Haddii aad qabto arrimo ku xidhidhiyaha mareegaha, waxa aad isku dayi kartaa in aad ku dhejiso. Kaliya(Simply) ku qor amarkan soo socda laakiin ku beddel <host> ciwaanka shabakadda ama IP ( Internal Protocol ) ciwaanka. Amarka sidoo kale wuxuu quseeyaa aaladaha ku jira shabakada deegaanka, oo uu ku jiro router laftiisa.

ping <host>

Mac-gaagu waa inuu soo diraa xidhmooyin xog ah si isdaba joog ah(send packets of data repeatedly) oo uu ku muujiyaa wakhtiyada jawaabta millise seconds. Riix Control + C si aad u joojiso amarka.

Si aad amarka ugu socodsiiso tiro go'an oo xirmo xog ah, isticmaal -c <number of packets> dood — tusaale, ping-c 4 google.com .

4. Dareemi Cache-ga DNS

Kaydka Mac-ga ee DNS ( Nidaamka Magaca Domain(Domain Name System) ) wuxuu ka kooban yahay magacyo domain "la xaliyay" oo ku jira foomka ciwaanka IP-ga. Haddii kaydka DNS uu dhaco ama uu xumaado, waxaa laga yaabaa inaad la kulanto arrimaha gelitaanka ama soo dejinta mareegaha. 

Si aad u nadiifiso kaydka DNS ee Mac(clear the DNS cache on Mac) , ku socodsii amarka soo socda ee Terminal :

sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder

Waa inaad tan raacdaa adigoo gelaya erayga sirta ah ee akoonkaaga isticmaalaha Mac si aad u oggolaato amarka.

Haddi tirtirida kaydka DNS aanu ku caawin, waa inaad isku daydaa nadiifinta kaydka browserka Safari, Chrome, ama Firefox(clearing the Safari, Chrome, or Firefox browser cache) .

5. Tus Jidka Faylka Buuxa ee Finder

Marka aad si qoto dheer u qoddo Finder , waxaad ka heli kartaa kuul goobtaada oo leh Baarka Waddada(Path Bar) . Waxaad ku kicin kartaa adiga oo dooranaya View > Show Bar(Show Path Bar)

Laakin waxa kale oo aad isticmaali kartaa amarka soo socda si aad u muujiso dariiqa fayl-dhaqameedka ee ciwaanka Finder. Si taas loo sameeyo, kaliya ku socodsii amarka hoose:

Faallooyinka qor com.apple.finder _FXShowPosixPathInTitle -bool HAA;killall Finder(defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES;killall Finder)

Haddii aad rabto inaad joojiso dariiqa faylka buuxa ee Finder waqti dambe, isticmaal amarkan soo socda:

Faallooyinka qor com.apple.finder _FXShowPosixPathInTitle -bool NO;killall Finder(defaults write com.apple.finder _FXShowPosixPathInTitle -bool NO;killall Finder)

Halkan waxaa ah siyaabo kale oo lagu muujiyo dariiqa faylka macOS(reveal the path of a file on macOS) .

6. Soo deji faylalka

Ma(Did) ogtahay inaad soo dejisan karto faylasha si toos ah Terminalka(Terminal) laftiisa? Haddii ay dhibaato kaa haysato samaynta soo dejinta biraawsarkaaga, ku qor taliska hoose ee Terminal , ku beddel <url> URL soo dejinta. 

curl -O <url>

Faylku waa inuu bilaabo soo dejinta isla markaaba, oo ay la socoto macluumaadka sida xawaaraha soo dejinta iyo xogta la helay.

Sida caadiga ah, amarku wuxuu soo dejiyaa faylasha xididka koontada isticmaalaha Mac . Waxaad u bedeli kartaa taas ka hor ( tusaale ahaan tusaha Soodejinta (Downloads)Mac , tusaale ahaan) adigoo isticmaalaya hagaha Beddelka— (Change Directory—)cd —command

cd ~/Downloads/

7. cadaadi oo fur furaha-ilaali faylalka

Markaad cadaadinayso galka xasaasiga ah, waa inaad codsataa ilaalinta erayga sirta ah si aad uga ilaaliso dadka kale inay galaan waxa ku jira(apply password-protection to prevent others from accessing it’s contents) fasax la'aan. Taas, waxaad u baahan tahay Terminal .

Ku bilow adigoo u beddelaya tusaha Terminal -ka galka uu ka kooban yahay galka aad rabto inaad ku cadaadiso. Tusaale ahaan, haddii ay ku taal desktop-ka, ku qor sidan soo socota:

cd ~/Desktop/

Kadib, lasoco amarka hoose:

zip -er <output folder name.zip> <source folder name>

Ku beddel <output folder name.zip> iyo <source folder name> magacyada galka wax soo saarka iyo galka isha, siday u kala horreeyaan. 

Tusaale ahaan, haddii aad rabto inaad cadaadiso galka lagu calaamadiyay PDFs oo aad calaamadee faylka ZIP ee ka soo baxay isla magaca, ku qor zip-er PDFs.zip PDFs . Kadib, geli oo xaqiiji erayga sirta ah ee aad rabto inaad ku darto faylka ZIP -ka.(ZIP)

8. Samee Xidhiidhada Calaamadaha

Xidhiidhiyayaasha calaamaduhu waa galal gaaban oo tilmaamaya meelo kala duwan oo ku yaal Mac . Way ku habboon yihiin waxayna kuu oggolaanayaan inaad sameyso dhammaan noocyada waxyaallaha. Tusaale ahaan, waxaad bedeli kartaa meesha gurmad ee asalka ah ee kaydinta iPhone ama waxaad isku dhejin kartaa galka iCloud adigoon wax u wareejin. Amarka Mac Terminal- ka si loo abuuro symlink waa sida soo socota:

ln -s </path/to/original> </path/to/link>

Ku beddel </path/to/original> hagaha bartilmaameedka, iyo </path/to/link> meesha ay ku jirto calaamadda.

Sawirka hoose wuxuu muujinayaa amar faraya Terminal si loo abuuro calaamad ku jirta iCloud Drive oo tilmaamaysa galka lagu calaamadiyay PDFs ee ku dhex jira galka (PDFs)Dukumentiyada(Documents) Mac .

Halkan waxaa ah sharraxaad qotodheer oo ku saabsan sida isku xirka calaamaduhu u shaqeeyaan Mac(how symbolic links work on the Mac) .

9. Jadwal xidhid ama dib u bilow

Waxaad jadwal u samayn kartaa Mac -gaaga inuu xidho ka dib wakhti cayiman. Ku qor amarkan soo socda, adigoo ku bedelaya <time> wakhtiga ay soconayso daqiiqado gudahood:

$ sudo shutdown -h <time>

Beddelkeeda, waxaad ku dari kartaa Mac -gaaga inuu dib u bilaabo adoo ku beddelaya -h doodda -r -tusaale, $ sudo shutdown -r 60 .

10. Talking Mac

Kani waa amar madadaalo leh:

say <words>

Ku beddel <words> wax kasta oo aad rabto, Mac kaagana(Mac) waa inuu bilaabo ku hadalka isla marka aad riixdo Geli(Enter) !

Waxaad sidoo kale ka dhigi kartaa Mac ku hadla codad kala duwan. Dhowr tusaale waxaa ka mid ah:

say -v fred <words>

say -v samantha <words>

Talo: Ku(Tip:) qor dheh -v? (say -v ?)oo taabo Gelida(Enter) si aad u muujiso codad dheeraad ah.

15 Amarrada Terminalka Dheeraadka ah(Additional Terminal Commands) ee Mac

Ma heli kartaa ku filan Terminalka(Terminal) ? Halkan waxaa ah 15 amarro oo dheeri ah oo ay tahay inaad ogaato.

ActionCommand
View Running Processestop
Check Mac’s Uptimeuptime
Reveal IP Addresscurl ipecho.net/plain; echo
Display Wireless Access Pointnetstat -nr | grep default
View Hidden Files in Finderdefaults write com.apple.Finder AppleShowAllFiles true;killall Finder
Change Default Screenshot Namedefaults write com.apple.screencapture name “New Name”;killall SystemUIServer
Disable Screenshot Drop Shadows$ defaults write com.apple.screencapture disable-shadow -bool TRUE;killall SystemUIServer
Copy Data Between Locationsditto -V </old/path/> </new/path/>
Make Hidden Apps Hidden on Dockdefaults write com.apple.Dock showhidden -bool TRUE;killall Dock
Add Spacers to Dockdefaults write com.apple.dock persistent-apps -array-add ‘{“tile-type”=”spacer-tile”;}’;killall Dock
Restart Automatically After a Freezesudo systemsetup -setrestartfreeze on
Sound Like An iPhone While Chargingdefaults write com.apple.PowerChime ChimeOnAllHardware -bool true;open /System/Library/CoreServices/PowerChime.app
Run Same Command!!
Show Terminal Historyhistory
Force-Empty the Trashsudo rm -rf ~/.Trash/

Terminal Whiz

Amarrada Mac Terminal ee(Mac Terminal) kor ku xusan maaha kuwo dhammaystiran sinaba, laakiin waa inay bixiyaan kiisas badan oo la isticmaalo markaad isticmaaleyso Mac -gaaga . Haddii aad haysatid kuwa ugu cadcad oo aan samayn liiska, xor u noqo inaad la wadaagto faallooyinka hoose.



About the author

Waxaan ahay barnaamij kombuyuutar oo ku takhasusay horumarinta software-ka MacOS. Waxaan u adeegsadaa xirfadahayga si aan u qoro faallooyin xirfadeed oo aan ku siiyo talooyin ku saabsan sida loo horumariyo xirfadahaaga barnaamij ee Mac-ka. Waxa kale oo aan haystaa shabakad bixisa tifaftiran, tilmaamo tallaabo-tallaabo ah oo lagu abuurayo degel guul leh.



Related posts