The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,767 other followers

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 [WayBack20 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: [WayBacktelnet 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 [WayBacknetsh wlan show profile SSID key=clear (replace SSID with your network name; use nets 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: [WayBackdefaults write com.apple.screencapture type JPG (you can also use JP2 (for JPEG2000), PDF, 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 press Esc followed by X, type in tetris, pong, snake or solitaire (to exit emacs, press CtrlX followed by CtrlC). There are [WayBack] more emacs games.

5) Get a dictionary definition: run curl dict://dict.org/d:word (where word is what you are after) which uses the [WayBack] dict protocol

6) 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 this AppleShowAllFiles 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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: