I would like to delete and permanently delete a file in finder using del and shift+delete (windows style).
Is there any way to remap this in OS X lion?
If you want to delete files immediately, you can copy the files, open Terminal or iTerm, type
If you want to delete the files securely so that they cannot be recovered with an application like DiskWarrior or DataRescue, you can use
You could also create a service like this:
I didn't use an Ask for Confirmation action, because it can't be used to display the paths specified as arguments, and the dialogs shown by it don't get keyboard focus.
The service cannot be used to delete a file if deleting it would require superuser privileges.
You can give the service a keyboard shortcut from System Preferences > Keyboard > Keyboard Shortcuts > Services. The shortcut recorders don't allow entering ⇧⌦ as a keyboard shortcut, but you can first give the service some temporary shortcut, then close the System Preferences window, then run something like
As for making ⌦ (Mac forward delete / Windows delete) move files to the trash, you can modify Finder's property list:
However that also makes pressing ⌦ move a file to the trash when you are renaming a file.
If a two-step keyboard process is acceptable, you could always do:
⌘ + ⌫ to move the file to the Trash
⌘ + ⇧ + ⌫ to empty the Trash (with confirmation popup) or
⌘ + ⇧ + ⌥ +⌫ to empty the Trash (without confirmation popup).
Obviously, that will also get rid of all the other files already in the trash.
Alternatively, maybe something like Trash X would help. The description says:
What you can do is send the file(s) to trash, and then click Finder->Secure Empty Trash.
You can also make a keyboard shortcut to make that process a little quicker, as described in this article.
It's not exactly what you want, but seems to be the closest you can get without looking into creating something with Automator or Keyboard Maestro.
I have made a simple app in cocoa, which acts like the trash icon but with different behaviour ie. when a file or folder is dropped on its icon in dock, it deletes it permanently.
I have also written a blog post about it- Mac OS X : shift + delete
Here is the link for the app- DeleteMe
Basic idea is - use: rm -rf , exactly the same what is suggested in the most voted answer, but implemented in a different way ;-)