Deleting files without using Trash - MacRumors Forums
Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > OS X

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 9, 2006, 03:22 PM   #1
typecase
macrumors regular
 
Join Date: Feb 2005
Deleting files without using Trash

Hello,

Something has been bugging me for a while now. I haven't found a way to delete a file without using the trash can. I can do it with the command line, but this is cumbersome sometimes. In Windows, I could select a file and hold down control while I hit delete and it would bypass the recycle bin and be deleted. Is there a way do this with Mac OS X?

I find this problem most annoying especially when dealing with removable drives (like USB drives) as the files are left on the drive. The only way to remove them is to use the command line or empty my entire trash can. Sometimes I'm not ready to empty the trash quite yet. Speaking of which, in windows, you could go into the recycle bin and "empty" or delete specific selected files. It seems in Mac OS X, you can only empty the entire trash can to permanently delete a file without using the command line.

Am I missing something? Please help. Is there a way to delete by bypassing the trash can?
typecase is offline   0 Reply With Quote
Old Dec 9, 2006, 03:37 PM   #2
pianoman
macrumors 68000
 
pianoman's Avatar
 
Join Date: May 2006
i don't know of any way to bypass the trash can, but you can hit shift+cmd+delete to empty the trash can using your keyboard instead of using your mouse to left click and select "Empty Trash."
pianoman is offline   0 Reply With Quote
Old Dec 9, 2006, 03:49 PM   #3
danny_w
macrumors 601
 
Join Date: Mar 2005
Location: Austin, TX
Here Here! When is Apple going to provide something as simple as the Ctl-Delete in Windows to bypass the Trashcan? This is probably the most missed feature from Windows for me, and it is very annoying.
__________________
2012 Mac Mini i7 2.3 GHz Samsung 840 ssd 10.8.5, LG G2 KitKat & iPhone 4 (T-Mobile) 6.1, TV2 (2), iPad2 16GB, iPad rMini 16GB
danny_w is offline   1 Reply With Quote
Old Dec 9, 2006, 03:55 PM   #4
rdowns
macrumors Penryn
 
rdowns's Avatar
 
Join Date: Jul 2003
Command-Delete (backspace key) will put a file in the trash without dragging it.
rdowns is offline   0 Reply With Quote
Old Dec 9, 2006, 04:15 PM   #5
danny_w
macrumors 601
 
Join Date: Mar 2005
Location: Austin, TX
Quote:
Originally Posted by rdowns View Post
Command-Delete (backspace key) will put a file in the trash without dragging it.
Thanks, I'll try that. I thought sure that I already had tried it, but perhaps not.

EDIT: OK, that works fine. Thanks again! I had been trying to use the 'delete' key that is above the cursor keys/to the right of the keyboard (the one with an 'x' on it); it didn't do anything.
__________________
2012 Mac Mini i7 2.3 GHz Samsung 840 ssd 10.8.5, LG G2 KitKat & iPhone 4 (T-Mobile) 6.1, TV2 (2), iPad2 16GB, iPad rMini 16GB
danny_w is offline   0 Reply With Quote
Old Dec 9, 2006, 05:51 PM   #6
Westside guy
macrumors 601
 
Westside guy's Avatar
 
Join Date: Oct 2003
Location: The soggy part of the Pacific NW
Since the bash command line "rm" doesn't involve the trash can, it would probably a simple thing to make an AppleScript droplet that'd do an immediate delete.
__________________
Your post count is insufficient to view signature
Westside guy is offline   0 Reply With Quote
Old Dec 10, 2006, 01:18 AM   #7
typecase
Thread Starter
macrumors regular
 
Join Date: Feb 2005
As I mentioned in my post, I often use rm to bypass the trash completely if there's a file on a removable disk I want to delete permanently (and recover the space on said disk) but am not quite ready to empty the rest of the trash. I'm guessing there's no direct way do this without using rm and the terminal. I suppose something could be rigged by writing a script but the OS should have this basic functionality. It's a shame, too. It'd be nice to be able to hold down the command key and hit the delete button and the file would just disappear (without moving to the trash at all--if this was not clear before I apologize). Also, it'd be great to be able to do this inside the trash as well to permanently delete specific files without emptying the rest of my trash.
typecase is offline   0 Reply With Quote
Old Dec 10, 2006, 09:39 AM   #8
danny_w
macrumors 601
 
Join Date: Mar 2005
Location: Austin, TX
Also, is there any way to rummage through the trash and delete just certain files or restore certain files to their original place? Both these actions are built into Windows, and are very easy. Surely there is an equivalent on Mac.
__________________
2012 Mac Mini i7 2.3 GHz Samsung 840 ssd 10.8.5, LG G2 KitKat & iPhone 4 (T-Mobile) 6.1, TV2 (2), iPad2 16GB, iPad rMini 16GB
danny_w is offline   0 Reply With Quote
Old Dec 10, 2006, 10:30 AM   #9
numlock
macrumors 65816
 
Join Date: Mar 2006
There is a automator plugin that deletes the files/folders completely. I have it as a plugin in the contextual menu. Theres also compost which you gives you the same basic function. But you can get burned using these utilities its happened to be with both of these softwares. Atleast the automator plugin gives you the popup menu to select yes or no.

To go through the trash and delete some and restore some i think you would need a third party application. Maybe pathfinder can do it now but filerun (which to me looked very promising) was supposed to do this among other things but its almost a year since was supposed to ready so who knows
numlock is online now   0 Reply With Quote
Old Dec 10, 2006, 12:17 PM   #10
ddekker
macrumors regular
 
Join Date: Sep 2006
Location: Michigan
we had a designer that uses a mac "lose" a folder full of files I was wondering if there was a way that he could have deleted them without them making it to the trash can by hitting some strange key combination, everyone is pretty sure someone cam in through the network and nuked it..lol... paranoia.. he was copying files from his laptop to another users PC through the network...

DD
__________________
looking for help on my switch to mac
http://trialsoftheswitch.com
ddekker is offline   0 Reply With Quote
Old Dec 19, 2011, 05:41 PM   #11
Macguy97
macrumors newbie
 
Join Date: Sep 2010
Location: Brisbane
Send a message via AIM to Macguy97 Send a message via MSN to Macguy97
Can someone generate an AppleScipt for this?

An AppleScript would be great for this.

You could then save it in the services menu. That way, right-clicking would perform the AppleScript an delete the file?

How would you get the AppleScript to point to the file though?
Macguy97 is offline   0 Reply With Quote
Old Dec 19, 2011, 06:13 PM   #12
Jolly Jimmy
macrumors 65816
 
Jolly Jimmy's Avatar
 
Join Date: Dec 2007
Quote:
Originally Posted by Macguy97 View Post
An AppleScript would be great for this.

You could then save it in the services menu. That way, right-clicking would perform the AppleScript an delete the file?

How would you get the AppleScript to point to the file though?
Try this one I wrote.

Code:
tell application "Finder"
	set theSelection to selection
	
	if theSelection is {} then
		beep
		activate current application
		display alert "No files are selected for deletion." message "Select one or more files to delete." as warning
	else
		activate current application
		display alert "Delete item(s)?" message "The selected item(s) will be deleted immediately. Are you sure you want to continue?" buttons {"OK", "Cancel"} as warning
		set buttonpressed to button returned of result
		
		if the buttonpressed is "OK" then
			repeat with i from 1 to (count theSelection)
				
				set item1 to (the quoted form of POSIX path of (item i of the theSelection as alias))
				set deleteit to "rm -rf " & item1 & ""
				
				try
					do shell script deleteit
				on error
					do shell script deleteit with administrator privileges
				end try
			end repeat
		end if
	end if
end tell
Jolly Jimmy is offline   3 Reply With Quote
Old Jul 27, 2012, 11:51 AM   #13
burak.duvan
macrumors newbie
 
Join Date: May 2010
When you eject removable drives, they are removed from trash. If you do not unmount (cmd+e) the drives before you unplug them, it won't delete the files.

But I have a problem opposite to yours. I cannot send the files to trash. When I remove (cmd+backspace) the files, Finder permanently deletes them. I do not know what I did, but I don't want to delete all my files permanently, and I do not want to erase my disk and install a fresh OS X. Is there anybody who experiences the same problem?

Quote:
Originally Posted by typecase View Post
Hello,

Something has been bugging me for a while now. I haven't found a way to delete a file without using the trash can. I can do it with the command line, but this is cumbersome sometimes. In Windows, I could select a file and hold down control while I hit delete and it would bypass the recycle bin and be deleted. Is there a way do this with Mac OS X?

I find this problem most annoying especially when dealing with removable drives (like USB drives) as the files are left on the drive. The only way to remove them is to use the command line or empty my entire trash can. Sometimes I'm not ready to empty the trash quite yet. Speaking of which, in windows, you could go into the recycle bin and "empty" or delete specific selected files. It seems in Mac OS X, you can only empty the entire trash can to permanently delete a file without using the command line.

Am I missing something? Please help. Is there a way to delete by bypassing the trash can?
burak.duvan is offline   0 Reply With Quote
Old Jul 27, 2012, 03:09 PM   #14
Mr. Retrofire
macrumors 601
 
Mr. Retrofire's Avatar
 
Join Date: Mar 2010
Location: www.emiliana.cl
Quote:
Originally Posted by burak.duvan View Post
When you eject removable drives, they are removed from trash. If you do not unmount (cmd+e) the drives before you unplug them, it won't delete the files.
This does not delete the files. The files are still in the trash folder on the ejected volume. Btw, if you do not unmount the volume(s) before you unplug the drive(s) you can damage the file system structures on the volume(s), which can lead to data loss.

Quote:
Originally Posted by burak.duvan View Post
But I have a problem opposite to yours. I cannot send the files to trash. When I remove (cmd+backspace) the files, Finder permanently deletes them. I do not know what I did, but I don't want to delete all my files permanently, and I do not want to erase my disk and install a fresh OS X. Is there anybody who experiences the same problem?
http://forums.macrumors.com/showthre...7#post13005577
__________________

“Only the dead have seen the end of the war.”
-- Plato --
Mr. Retrofire is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > OS X

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Deleting old backups from secure trash ddublu OS X Mavericks (10.9) 2 May 4, 2014 11:13 AM
Issues deleting iTunes audio files & emptying trash spudexter Mac Applications and Mac App Store 13 Nov 3, 2013 01:57 PM
Deleting Files = Skips Trash legaleye3000 OS X Mavericks (10.9) 6 Oct 23, 2013 05:02 PM
Deleting gif files in trash ? mckey Mac Basics and Help 3 Dec 26, 2012 02:26 PM
Deleting an item in the trash inscrewtable OS X 3 Nov 2, 2012 04:50 PM

Forum Jump

All times are GMT -5. The time now is 06:09 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC