Skip to main content

Posts

Showing posts from February, 2011

Lock your Mac in 5 seconds

Security has always been a concern for all of us, specially when we are in our office. For which it is necessary that we lock our machine whenever we leave our workstation. Were you been on a PC, you would have tried Ctrl+Alt+Del and clicked on Lock Computer or Windows+L can do the job. Being on Mac very few of us actually know how to lock the machine using shortcut. Let’s learn it here Open up the System Preferences and open the Security section.  Now make sure that you have set you computer to require a password once the screen saver begins or once the computer has woken up from sleep as below. Now when you hold down the keys Control+Shift+Eject your screen will go black and after 5 seconds your computer will then require a password to log back in.

Run Mac OS X updates via Terminal

To run this command line, first open up Terminal from Applications > Utilities. Within Terminal type the following: sudo softwareupdate -i -v -a This script will run and do the following: First it will invoke the software update tool, it will then install any available updates using the -i modifier, it will also install all of them using the -a modifier. Finally the -v modifier will tell you what is happening. In short, look, download, install. If you want to use this tool but you don’t want to install anything. You can let the tool list any downloads available to you. To do this type the following: sudo softwareupdate -l The, -l, modifier will list any updates. It may take a while for anything to appear, its best to let it run. You will get something similar to the image below if any updates are available. A simple and useful command, that is quite interesting. If you want more information on this tool, type the following into Terminal. man softwareupdate

View zipped files without expanding

Don’t know how useful this command would be for an end user but yes, if you are good at Terminal, you would love to use this. So lets start, launch the Terminal. Navigate to the zip file you want to have a glance at, by using the “cd” command and type the path to your file. For example cd ./downloads , this file can be any any where on your Mac. downloads can be replaced by the folder on your Machine. Here comes the magic bit, copy and past the following into Terminal. unzip -l "$@" MyFile.zip Where text.zip is the name of you zip file you want to view. You need to have the at and dollar symbol for the text to be displayed on screen. You should have something similar to the image shown below. Very handy where you can see the size of the file in bytes, the date is was created and the name and location of the file. You can send the information found in the screen shot to a text file. You can use this to keep a log of a text file or as a backup to send to someone els...