banner



Useful MacOS Terminal Commands You May Not Know - powerrince1956

For many mass, the MacOS Terminal windowpane (operating room the Command Ready on Windows) is a scary situatio to be. It's viewed away umpteen as the sport only hoodie-wearing Red ink Bull's eye-guzzling hackers in Hollywood movies use, and if the ordinary man or woman in the street uses it for something, then watch knocked out because the whole world is going to cave in.

I felt that elbow room for a Years, xenophobic to belong anywhere near these windows for fear of permanently killing my computer and scope off Skynet. But then I realized I was missing stunned on a great deal of cool stuff and time-economy features by not learning how to use IT.

The computer mouse Beaver State trackpad are both useful in their own way, merely nothing beat generation typing out a command on the keyboard. IT's faster, easier, and doesn't break your rhythm when you are "in the geographical zone". A Google search will throw up lots of "cool Terminal commands" articles (near as many as "where do babies make out from?" articles), but with each new incarnation of Mac, some Terminal commands stop working, some become redundant, and unweathered ones are created.

So here are the useful ones I have found. About one have been reliable on MacOS Sierra and they work.

Show Hidden Files On MacOS

As with all other operating systems, there's a very good reason why you preceptor't see hidden files aside default. Just because deleting the vicious file cabinet would nuke your computer and that wouldn't Be sound. Soh by default, the secret files are….healed, out of sight.

But sometimes it Crataegus laevigata be necessary to view the secret files, if you are troubleshooting a problem. For example, I cannot aim a file in the trash to delete, and IT was only after several weeks of cursing in a cardinal ancient languages that I finally looked at the hidden files and discovered the unregenerate file was coming from a SD card.

So to view the hidden files, light up the Fatal window and type (or CMD+C and CMD+V)

defaults write com.apple.finder AppleShowAllFiles Sincere
killall Finder

And….hidden files become unhidden!

When you have finished, you rear hold in the out of sight files again, by inputting the same command, but replacing True up with Unharmonious. Please coiffe that. I don't want you telltale me you unintentionally deleted a overcritical organization file and now your Macintosh is kaput.

Copy Table of contents Of Folder Into a New Leaflet

Lovers of the shiner and trackpad will be copying their files and folders across different drives, simply by dragging the pamphlet. Simply you can copy folders and files from one drive to another simply by victimization a Terminal command.

Start with ditto mark -v so set back the path of the folder you want to transcript, and finally the course of the folder the copied files should land up in. Hit "enter" and let the Mac do its copying thing.

ditto -V /downloads/files/ /usb/files/

Commute Screenshot Format

My Macbook churns out screenshots as PNG initialize, but depending on what you're doing, PNG is not really the second-best image format. Sometimes JPG is healthier or maybe you want GIF screenshots?

Either way, if you are not happy with the format your Mac is making screenshots as, you can deepen the format by entering the following command. Replace JPG with your desired initialize (unless you want JPG of path).

defaults write com.apple.screencapture type JPG
killall SystemUIServer

Delete Your Entire Download History

I am a large online privacy and security fanatic, and when I discovered this one, I was horrified. If I had remained ignorant, close to officer might have discovered that I download David Hasselhoff devotee pictures from Google on a regular ground.

Basically your Mackintosh keeps a running log of EVERYTHING that you download. Don't believe me, enter the following command into Endmost. I'll postponemen.

sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'choose LSQuarantineDataURLString from LSQuarantineEvent'

See, told you!

download history

Merely don't occupy, there's an well-to-do way to wipe that history. Conscionable enter the tailing bid and tally "enter".

sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'delete from LSQuarantineEvent'

Now enter the first command again, and your download history will follow gone. Just be sure to run this command on a regular basis. Especially if you are carrefour the US border and are possible to have your reckoner searched.

Blue-pencil Last History

If keeping a lumber of your download history wasn't bad enough, a log of complete your Terminal commands is also kept. Which ISN't as sensitive as your download history manifestly, only nevertheless….

To survey your Terminal usage history, figure :

history

To blue-pencil your Terminal usage history, enter :

account -c

And it's altogether gone.

Enable Airdrop On Older Unfounded Macs & On Ethernet

This is the one I didn't test because I have a MacBook which DOES support Airdrop. But I enclosed information technology here because it was simply too good to ignore. If you give birth an old Mac, hear it out and see if it whole caboodle. If it doesn't, let me know and I volition remove this one.

defaults compose com.apple.NetworkBrowser BrowseAllInterfaces -bool TRUE
killall Viewfinder

To reverse this, enter the preceding command, but replace TRUE with Imitation.

Check How Long It's Been Since You Rebooted Your Mac

I birth a really badly habit – I rarely shut down operating theater reboot my Mack. I just put the eyelid down and put information technology in sleep mode. Partly because I am just too lazy. But I should do fold or restart IT more oftentimes. It blows away all the internal cobwebs, and it is also a go security measures insurance.

To see how long your Mac has been running since its last shutdown/re-start, case
uptime

When I checked, it told me 17 days. Oops.

Order Your Mac To Automatically Boot When Information technology Freezes

Thankfully my Mac is not at the stage where it freezes along-prompt, so technically I haven't tested this i either. But I have put it into Terminal, and the command was recognised. So I assume it works. I'll know soon enough when the Macintosh freezes first.
sudo systemsetup -setrestartfreeze on

Basically the statement tells the Mack to mechanically restart when the organisation freezes. True up, you could just press the "off" button, merely this way information technology's automated and you don't have to do anything.

Install Updates Without Launching App Store

To see all gettable updates to your installed software, it is normal to exposed the Mac App Store, and head to the Updates tab. But you privy completely bypass the App Store and check for updates via the Terminal.

xkcd sandwich

Just in case you are a fledgling to the Terminal, "sudo" is a "super-user" command which gives you complete access and curb to all functions of your calculator. Running Sudo gives you the security privileges of all other users along your system.

So to retrieve all disposable updates….

sudo softwareupdate -l

If it finds any updates, run the followinng command to set u them.

sudo softwareupdate -ia

Please contain in mind though that it only checks for updates for package downloaded from the App Storage. If you have installed software program from a third-party website, this command will not check those programs.

Change Default Name Of a Screenshot

When the Mack takes a screenshot, it gives it a pretty ugly looking filename.

That looks pretty crap, so you can change information technology to something else, something more to your liking. So…

defaults write com.apple.screencapture nominate "newscreenshotname"

Obviously replacing "newscreenshotname" with the desired new name you want.

Add a Message In The Login Window

There are many shipway to customize your Mac, only one of the best ways is to put a message happening your login screen. Some people put their contact information there, in case they lose their laptop computer and some kind-hearted soul wants to return it. Others (like myself) have risible concise little remarks.

Since I am a huge Trekkie (and a huge fan of Mr Spock), my screen says….yep, you guessed it…

So to add your message/quote/some, type the pursuing (replacing "Experience Long & Get ahead" with your own desired message).

sudo defaults write /Library/Preferences/com.orchard apple tree.loginwindow LoginwindowText "Live Lasting & Fly high"

If you short decide 1 day to have no message at all, type the following (basically the same command, but minus any message).

sudo defaults delete /Library/Preferences/com.apple.loginwindow LoginwindowText

Download a File Without a Browser

If someone you trust sends you a download link (say by present electronic messaging), in that location's no demand to open a browser to begin that download. You can tell apart Terminal instead to download it for you.

Obviously replace the Uniform resource locator with the URL of what you want to download.

curl -O https://download.mozilla.org/?ware=firefox-52.0-SSL&OS=osx&lang=nut-The States

Create An Empty File out For Testing

If you are testing something, Oregon building something, you may ask to make a fake file of a certain size. Terminal can make one for you.

mkfile 500mb test.exe

After "mkfile", just typewrite in the size you want the file (either in KB, MB, OR Britain), and then the gens and file initialize of the file. The command above will make a 500MB Indian file known as test.exe (an empty file of course).

Quit The Finder

It volition pass off to new Mac users very quickly that there is no soft fashio to unopen down the Finder. You can shut down all other programs, simply not the Discoverer. Only if your Mac is running play slow, shutting down the Finder can actually self-governing up a lot of some needed memory space.

But if Apple doesn't give you a default careful function, you need to make it yourself.

defaults spell com.orchard apple tree.finder QuitMenuItem -bool true
killall Finder

Now check your Finder menu at the top of the sort, and you will see a "Quit Finder" option at the bottom.

The Finder logo will remain in the Dock but the weensy dot underneath will now winking unstylish. Also note that the Trash bin will now be inaccessible until you open the Finder once more by clicking on the Bob icon.

Clear The Terminal Screen Altogether

At last, to clear your Terminal screen and make it blank again, type –

clear

Can you suggest any others that we may not know? If so, let us know in the comments below.

Sudo Sandwich – XKCD

Source: https://trendblog.net/useful-macos-terminal-commands/

Posted by: powerrince1956.blogspot.com

0 Response to "Useful MacOS Terminal Commands You May Not Know - powerrince1956"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel