HowTo Copy a Folder in Linux/Unix

So, I got this question recently from a new Linux user, but I’m pretty sure even people who’ve been using Linux for some time will have a question or two regarding copying files on the command line.

Happy penguins

Unix, and by extension, Linux isn’t known to be very chatty. Most commands are two or at the most three characters long with a hundred options, so a lot of people who’ve come to Linux by way of easy to use distributions such as Ubuntu or Mint have never really used the command line to get done work. I, on the other hand, am an old Linux hand and, frankly, am the most comfortable on the command line.

Continue reading “HowTo Copy a Folder in Linux/Unix”

How To Convert Text To Audio Using Automator On OS X

If you’ve been following this blog for any length of time, you’d know we’re big fans using tools that’ll save us time or effort, however small it may be. After all, computers are the best at doing manual, repetitive work and doing it much better than humans would do.

OS X has a lot of little tools and utilities to help us save time and one of my favorite tools for automating any kind of workflow is Automator. We’ve written about this earlier and we’re back with another nifty trick up Automator’s sleeves.

Continue reading “How To Convert Text To Audio Using Automator On OS X”

How To Reindex Your Folders Or Rebuild The Spotlight Index

Spotlight is without a doubt, one of my favorite technologies in Mac OS X. I’ve been a fan every since it was first introduced with Mac OS X 10.4 “Tiger”. Spotlight, at it’s core, is essentially a database or an index of all the files on your hard drive.

The user facing part of spotlight lets a user query this index and get results almost instantaneously. In fact, I’ve gotten so used to spotlight, I’ve almost forgotten those days when we used to meticulously keep our important files in various folders and maintain the folder structures religiously, lest we save a file in some folder and can’t find it later. With spotlight, I never have to worry about folders. I just type a few letters of the filename or even it’s content, and spotlight will invariably get me the correct file.

Continue reading “How To Reindex Your Folders Or Rebuild The Spotlight Index”

Stream The Latest BlockBusters For Free Using Popcorn Time

Hollywood has a pretty tight grip on the business of streaming movies and if you’re someone who’d like to watch the latest blockbusters from the comfort of your own couch, you basically have no option but to wait for the theatrical release, even if you’re willing to pay money to companies such as Netflix.

In my opinion, this is the only reason for the massive popularity of mediums such as bittorrent for pirating movies and music. Downloading a good quality print of a movie from a torrent search engine isn’t rocket science but it’s still something that a lot of non-techies don’t know how to do, and they’d be more than willing to pay a fee to the hollywood studios if they’d let them download and see the movies at home. In the absence of any such option, it is natural for people to resort to piracy.

Continue reading “Stream The Latest BlockBusters For Free Using Popcorn Time”

How To Enable php On Apache With OS X Mavericks

phpIf you’re an OS X user developing php based application, you’d have realised that the apache configuration shipped with OS X doesn’t have php enabled out of the box. If you try to open a php script using your browser, you’ll just see the php code as text and not the rendered HTML you’re expecting.

But, don’t fret. It’s actually pretty simple to enable php on OS X. Here is what you should do.

Continue reading “How To Enable php On Apache With OS X Mavericks”

How To Start Apache Server In OS X Mavericks

ApacheMac OS X used to be the one of the easiest operating systems around to get a basic web development setup. For anyone interested in learning HTML/CSS/JS etc, all they had to do was open the sharing pane from system preferences and enable the web sharing option. On OS X 10.9, web sharing has been removed.

That doesn’t mean apache isn’t installed, by default. It is, its just hidden away waiting to be manually invoked using a Terminal command.

Continue reading “How To Start Apache Server In OS X Mavericks”

How to view HTML source in Safari And Firefox

If you’re a Linux and a Mac OS X user, like I am, chances are that you tend to stick to the same browser in both the operating systems, maybe because you’re familiar with it or maybe because you just like that one browser. In my case, that’s usually the Mozilla Firefox browser. While I have both Chrome and Firefox installed on both my machines, I still tend to come back to Firefox always. Anyway, I digress.

I’ve been using Firefox to debug and display a ruby on rails app that I’m working on and it was going fine till I decided to use Safari for the same work, because I thought I should test in both the browsers.

Now, if you’ve developed any HTML based app before, you’d know how important and useful the “view source” function is, that any modern browser incorporates. HTML is a simple markup language and mostly you can just debug your markup by just looking at the browser UI, but sometimes, especially when you’re dynamically generating content and pages, as in case of Ruby on rails, you need to view the source to figure out what’s happening.

Continue reading “How to view HTML source in Safari And Firefox”

Top 5 Sites To Watch Movies And Documentaries Online For Free

If one goes by the available statistics alone, TV viewership is declining across the world, especially in countries where fast and reliable Internet is available and cheap enough for everyone to afford. While that does spell doom for TV companies, trends also reveal that movie and documentary film makers are doing alright and in-fact, viewership seems to be increasing for them with the only difference being that most viewers these days prefer to get their fix at home instead of at the movie theaters.

For all you cord cutters out there, we have compiled of a list of the Top 5 sites to view movies and documentaries online for free. Read on for the full list.

Continue reading “Top 5 Sites To Watch Movies And Documentaries Online For Free”

The Curious Case Of The iPad Mini

Unless you’ve been living under a rock for the last few days, you’d probably know that Apple plans to release a new 7″ (or 7.8″) iPad sometime this month. Well, actually, Apple hasn’t confirmed anything except sent out an invite to the tech press which seems to all but confirm the existence of the said device. There has been speculation about the device’s size, price and the ability to conjure up the Patronus Charm and blow the competition away.

Continue reading “The Curious Case Of The iPad Mini”

How To Password Protect Files in Linux

The USP of Linux has always been the strong security and stability it offers. Per user/group permissions and ACLs (access control lists) take care of almost all the security needs of a home users as well as an enterprise customer. If there is a need for even more fine grained control, there are various flavors of Linux available that are specifically designed with industrial grade security in mind and certified by organisations such as the NSA.

If you’re a home user, though, all this doesn’t really matter to you. Sure, it helps to have seperate permissions for different users on the system, if you’re sharing your computer with, say, your sibling, but configuring ACLs for home a user is a little overkill, if you ask me.

If all you need is a way to password protect certain important files from the prying eyes of your siblings, kids or pesky neighbors, Linux doesn’t offer anything *out of the box*. Fear not, though, we have just the right tool for you.

Password Protect Files

mcrypt is a utility designed to encrypt/decrypt a file using standard encryption techniques. If you don’t have mcrypt installed, you can install it with the following command.

apt-get install mcrypt

To password protect a file execute the following command

mcrypt <filename>

The above command will output something like this.

khera@khera:~$ mcrypt test1
Enter the passphrase (maximum of 512 characters)
Please use a combination of upper and lower case letters and numbers.
Enter passphrase: Enter password here
Enter passphrase: Repeat password here

File test1 was encrypted.
khera@home:~$

By default, mcrypt creates a new encrypted file with the extension .nc added to the original filename and leaves the original file intact. If this is not what you want, and you’d rather not have any traces of the original file, use mcrypt with the “-u” option.

mcrypt -u <filename>

This will ask you for a password as usual and the only difference will be that when the command finishes executing, the original file, test1 in the above case, will be deleted.

Decrypting a Password Protected File

So, now you know how to password protect file but what about decrypting it.

Turns out mcrypt does that too. Just use mcrypt with the “-d” option and it will decrypt the file for you after confirming the password with you.

mcrypt -d <encrypted filename>

The output should look something like this

khera@khera:~$ mcrypt -d test1.nc
Enter passphrase: Enter password here
File test1.nc was decrypted.

Like, in the encryption phase, mcrypt doesn’t delete the original file by default and if that is what you want, use mcrypt with the -u switch.

mcrypt -u -d <encrypted filename>

This will decrypt the file and delete the original encrypted file leaving no traces of it on your computer.

How was that for an easy encryption/decryption utility?