Can’t delete file on external hard drive – Mac

I ran out of space on my external hard drive so I selected some folder file and pressed command-delete on my keyboard. They files looked as if though they were deleted but I notice the available space did not budge. I knew right than it was time to whip out the terminal to force the hard drive in to submission.

1) Type these command into Terminal window. MAKE SURE TO replace “disk” with the name of your external drive. If you have a problem creating a path to your external hard drive, type “cd” than a space and drag the icon of your hard drive to the terminal window. A path will be filled in automatically.

Code:

cd /Volumes/disk

2) Type out the remove command on then hidden trash directory.

Code:

sudo rm -rf .Trashes

3) It will ask you for your password. You will not see your password as you type for extra security. Once you are done,  press enter.

Code:

Password:

If you have a lot of files that needed deleting (ex: over 20GB) you may notice a dalyed response. If so, just keep an eye on the drive’s avalible memory and you will notice a gradual increase of space right before your vary eyes.

PHP Remove last character from string

Want to remove the last character from your text. Just use Substr_Replace. This is how. Continue Reading »

Select UNIQUE or DISTINCT MySQL/PHP Queries

How to filter / remove duplicate items in your database query result using DISTINCT

Continue Reading »

MySQL DISTINCT to Remove Duplicate Listing

How to select and display records from MySQL table using the DISTINCT keyword for unique data.
Continue Reading »

Eject or Unmount a disk through the Terminal

Having problem unmounting your disk. Here is an alternative to restarting your computer to eject your unresponding disk.
Continue Reading »

Remove Underline-Links

Here is a quick and easy way to remove underline-links in your html links.
Continue Reading »