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]
driverquery
2) 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
(replaceSSID
with your network name; usenets wlan show profile
to view the network names)…
7) Check your laptop’s battery health: [WayBack]
powercfg /batteryreport
which will be in ” and hit Enter to generate the report, then%HOMEPATH%\battery-report.html
8) 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
,TIFF
and others)2) Get your Mac to speak to you: use
say
3) 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 pressEsc
followed byX
, type intetris
,pong
,snake
orsolitaire
(to exitemacs
, pressCtrl
–X
followed byCtrl
–C
). There are [WayBack] more emacs games.5) Get a dictionary definition: run
curl dict://dict.org/d:word
(whereword
is what you are after) which uses the [WayBack] dict protocol6) Keep macOS awake: [WayBack]
caffeinate
optionally 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 Finder
or use thisAppleShowAllFiles
script 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 Dock
running 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 Reply