Web developer
28 Apr
In the following snap code I’ll show you how to empty a file from the command line in Linux or Mac OS. This without any need for opening the file self or deleting it and creating a new one with the same name.
Let say that you have a file called emptyme.txt. To empty the content of this file just use the following command and it’s done:
1 | $ > emptyme.txt |
This will empty the content of emptyme.txt
1 | $ cat /dev/null > emptyme.txt |
This will read the content of /dev/null (which contains in fact nothing) and > write this into emptyme.txt
1 | $ echo "Hello there!" > emptyme.txt |
This will empty the content of emptyme.txt and drop the “Hello there!” string it in it.
11 Apr
Today when I’ve installed Windows Vista on my PC, I discovered that I don’t have permission to access some of my files located in the “D” drive. I wasn’t able to use Cygwin, Eclipse and other applications installed in this drive. I’ve googled to see if there’s a way to get the permissions back, and I found this amazing file which you easy can add to your registry.
In these steps you’ll see how to take the ownership of a file:
Download this file “own.zip”
Unzip it and add it to your registry
To take the ownership of a certain file, just right click on that file and click on “Take Ownership”

That’s it. Wasn’t that so easy???
If you want to remove the feature just download this file “own_rem.zip“, unzip it and run it