20 Cool Command Line Tricks for Windows and macOS
Posted by jpluimers on 2019/11/08
After all these years in the field, I still learned new tricks from [WayBack] 20 Cool Command Line Tricks for Windows and macOS which I have rephrased:
Windows
1) View installed drivers: [WayBack]
driverquery2) Watch Star Wars in ASCII: [WayBack]
telnet towel.blinkenlights.nl…
3) Save folder trees to disk:
tree(I had totally forgotten about this, probably because it leaves out a lot of directories and files)…
5) Show your Wi-Fi password [WayBack]
netsh wlan show profile SSID key=clear(replaceSSIDwith your network name; usenets wlan show profileto view the network names)…
7) Check your laptop’s battery health: [WayBack]
powercfg /batteryreportwhich will be in ” and hit Enter to generate the report, then%HOMEPATH%\battery-report.html8) View your Windows license key:
wmic path softwarelicensingservice get OA3xOriginalProductKey[WayBack]…
Mac OS X / macOS / however it is called now
1) Change the default screenshot type: [WayBack]
defaults write com.apple.screencapture type JPG(you can also useJP2(for JPEG2000),PNG,TIFFand others)2) Get your Mac to speak to you: use
say3) Add a message to the login screen:
sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "your new text on the logon window"[WayBack]4) Play Tetris and other classics: start
emacs, then pressEscfollowed byX, type intetris,pong,snakeorsolitaire(to exitemacs, pressCtrl–Xfollowed byCtrl–C). There are [WayBack] more emacs games.5) Get a dictionary definition: run
curl dict://dict.org/d:word(wherewordis what you are after) which uses the [WayBack] dict protocol6) Keep macOS awake: [WayBack]
caffeinateoptionally followed by a-t##parameter where##is the number of seconds to not sleep.7) Show hidden files:
defaults write com.apple.finder AppleShowAllFiles -bool TRUE; killall Finderor use thisAppleShowAllFilesscript which I had forgotten about writing in the first place.…
10) Add Spaces to the Dock:
defaults write com.apple.dock persistent-apps -array-add ‘{”tile-type”=”spacer-tile”;}’; killall Dockrunning the command as many times as you want spaces. To get rid of a space you’ve added, just drag them to the Trash.
–jeroen
via: [WayBack] 20 Cool Command Line Tricks for Windows and macOS http://flip.it/SvcQlu – Joe C. Hecht – Google+






Leave a comment