How can I delete individual files without emptying the entire trash?

Discussion in 'Mac Basics and Help' started by g-boac, Oct 29, 2008.

  1. g-boac macrumors 6502

    Joined:
    Oct 7, 2007
    #1
    Is there a way for me to selectively delete files? In other words, can I delete an individual file off of the Mac without emptying the contents of the entire trash can; or, can I delete a file or folder off of a jump drive or digital camera without emptying the entire trash (which deletes files off of both my hard drive, and the jump drive)?

    thanks!
    Mark
     
  2. wordmunger macrumors 603

    wordmunger

    Joined:
    Sep 3, 2003
    Location:
    North Carolina
    #2
    Create a file with the same name, then copy it over the original file.

    Better yet: rename it to match the name of one of the files in your trash bin. Then remove the file in your trash, copying over the original file. Then put it back in the trash -- there's no trace of the original file.

    Of course, if you're truly paranoid, you've still got a problem -- if you've got a time machine backup of the file, it's not really gone. Not sure what to do about that.
     
  3. blodwyn macrumors 65816

    Joined:
    Jul 28, 2004
    Location:
    Portland, Oregon
    #3
    Open up the Trash folder in a Finder window and then open up a Terminal session

    In the Terminal type "rm " (i.e. rm and then a space without the quotes) then drag the file you want to delete from the Trash Finder window to the terminal. This should append the file path to the rm command. Press return in the Terminal and the file should disappear from the Trash.
     
  4. wordmunger macrumors 603

    wordmunger

    Joined:
    Sep 3, 2003
    Location:
    North Carolina
    #4
    Good point. And, of course, it doesn't need to be in the trash -- you can do this no matter what folder your file is in.
     
  5. g-boac thread starter macrumors 6502

    Joined:
    Oct 7, 2007
    #5
    thanks!!!!

    blowdyn, wordmugger - AWESOME tips, thanks!!!!!!!!!!!

    Mark
     
  6. blodwyn macrumors 65816

    Joined:
    Jul 28, 2004
    Location:
    Portland, Oregon
    #6
    No problem. By the way, if you get an error saying that the file is a folder/directory, which happens when the file is a package (like Pages or Keynote files), then the command is

    "rm -rf " (without the quotes)

    followed by dragging the file over
     
  7. emt1 macrumors 65816

    Joined:
    Jan 30, 2008
    Location:
    Wisconsin
    #7
    This leads me to believe you are putting files in the trash that you don't intend to delete... may I ask why?
     
  8. wordmunger macrumors 603

    wordmunger

    Joined:
    Sep 3, 2003
    Location:
    North Carolina
    #8
    Personally I don't like to empty my trash unless I have to. There's nothing like the feeling of hitting "empty trash" and then realizing you actually still needed that file. Of course, these days with Time Machine, that's less of an issue, but old habits die hard.

    What's the point of having a recoverable trash bin if you can't actually recover stuff from it?
     
  9. emt1 macrumors 65816

    Joined:
    Jan 30, 2008
    Location:
    Wisconsin
    #9
    It just seems very risky to use the trash as a sort of file purgatory. If you think you might need the file, then don't send it to the trash. That's my philosophy anyways.
     
  10. g-boac thread starter macrumors 6502

    Joined:
    Oct 7, 2007
    #10
    I generally follow a pattern more like wordmugger. If I think I may need the file, I keep it. But if I don't expect I'll need it, or its an old version of a file that has no archival value, I'll toss it into the trash. And although I rarely pull files back out, I don't delete files unless I have to.

    But there are times when I do want to erase a file right away, which is what spurred my question.

    Mark
     
  11. Rik. macrumors newbie

    Rik.

    Joined:
    Dec 27, 2011
    #11
    Hi MacUsers.

    I make no apologies for resurrecting this thread, but I did a search on how to delete an individual file from the Trash.

    Seems that it's not just a simple process, though it can be done.

    You have to start the 'Terminal', then type in 'rm' and then a space.
    Then just drag the file you want to delete, from Trash to the Terminal, and press enter.

    Would it not be just easy to have a command on the right-click menu that allows that?

    Yes. I've read much about why move things into Trash if you didn't want to and why not have a folder where you can put these files until you want to delete them etc... etc... etc...
    I've even read much from those who want to preserve how Macs work and why should you do things like they work in Windows.

    Please don't defend any of that.

    I've been a user of PCs for 20 years and while I have to unlearn some of that, I have become a Mac user by choice.

    I want to learn but there are plenty of things that Windows does that are good also.

    For example, why can't I see my DVD Drive in Finder?
    Come on guys and gals, that's a dead easy one for you to answer?!
     
  12. Sydde macrumors 68020

    Sydde

    Joined:
    Aug 17, 2009
    #12
    Why would you need to? The Mac principle is not about "drives" but about "volumes". If you plug in an external, you do not need to know that it is drive "G:", it is just "/Volumes/ExternalDrive/". If you need to open the tray, just hit the Eject button on the keyboard.

    Sometimes the simpler way is difficult to get used to. Sorry about that.
     
  13. Rik. macrumors newbie

    Rik.

    Joined:
    Dec 27, 2011
    #13
    I was hoping to get an answer that would help me get used to, get the hang of what things are? Where they are?
    But it seems that I need to adopt the attitude of "Why would you need to?"

    In Finder, it says 'Mackintosh HD' Would that be a Hard Drive? Guess what? They call them Hard Drive in the Windows world.
    So, what's wrong with calling it a DVD Drive.
    OK. So, it's a volume in the Mac world.

    I was simply asking why I cannot see it in Finder?

    Is this how you help a newbie?

    Oh well. That will teach me, no end!
     
  14. notjustjay macrumors 603

    notjustjay

    Joined:
    Sep 19, 2003
    Location:
    Canada, eh?
    #14
    I think the point they were trying to make is that the Finder shows you the DATA, not the DRIVE.

    In Windows, my DVD drive might be E:\ or G:\ or whatever. But right now the drive is empty. If I try to browse to E:\, I get an error, and rightly so. There's no disc in the drive and therefore there's nothing to show. Now suppose I insert a DVD of my favourite photos. Now E:\ points to my photos. Now I eject that disc and pop in a disc full of backups. Now E:\ points to my backups.

    With me so far?

    The disadvantage is that at any given time you really have no idea what E:\ points to. It could be nothing. It could be my photos. It could be my backups. It could be anything.

    The Mac philosophy is that it won't even show you the drive if there's no disc inserted. And when it does, it will show you exactly what the name of the volume is that is mounted. So when I pop in my photos, you'll see /Volumes/Photos. Or /Volumes/Backups. Or whatever my disc is called.

    You can replace disc with Hard Drive or USB stick or whatever. The point is, Windows points you to the DRIVE and it's up to you to figure out what media is currently inserted (if any). Mac OS (and most Unix systems) points you to the DISC (or other media), i.e. the volume.
     
  15. Sydde macrumors 68020

    Sydde

    Joined:
    Aug 17, 2009
    #15
    My apologies for sounding obnoxious, but not having had much experience with Windows, I find your question hard to fathom. If there is no disc in the drive, what is there to see? By contrast, my hard drive has 4 separate volumes (partitions) on it, should I have to have drive letters for each of those, and how would that benefit me?

    You can find your DVD drive (whatever is in it) on your desktop, if you have that set up, or in the sidebar of your Finder window. If the drive itself is empty, you can see it in Disk Utility or in System Profiler, or if you are really geeky, there is a hidden unix directory called "/dev", if you want to try to figure that one out. All mounted volumes (accessible disks) can be found in those first two places. When a disk is not accessible, there is nothing to find.
     
  16. Rik. macrumors newbie

    Rik.

    Joined:
    Dec 27, 2011
    #16
    Hi Sydde.

    I have always portioned my drives on my PC.
    So I have a c:drive and a d:drive.
    I install programmes on c:drive and save all my files on d:drive.
    Having drive letters (volumes on a Mac) is extremely helpful.
    I'm not sure about you but you can see how that would help me.

    Are we then saying that if I partition the drive on my MacBook, I wouldn't know where each part is, and what is being stored where?
    I find that "hard" to believe?!
     
  17. Dark Dragoon macrumors 6502a

    Dark Dragoon

    Joined:
    Jul 28, 2006
    Location:
    UK
    #17
    No it would show you the partition name in Finder if it was mounted, when it's unmounted it will disappear as it's not available.

    Why would you want drive letters though when you can just name the partition whatever you want and have it always appear as that when you mount it. Even if you are plugging (mounting) and unplugging (unmounting) multiple drives. I guess if you really wanted to you could name your partitions C and D though that would be a bit pointless as naming them Macintosh HD and say Files HD (call it what you want) should be just as easy, and potentially make it more obvious as to what is stored where.

    Its worth noting however that unlike Windows the whole filesystem is under the root, which is usually located on the root of Macintosh HD (partition, can be named something else). So you can go to the root / and then go to /Volumes/ where the other drives are mounted, be that other hard drives, optical drives etc... though they can actually be mounted anywhere you like and not just in /Volumes. Which is one reason why there are no drive letters.

    This is all abstracted by Finder though, which just shows you the mounted drives so you don't have to worry about any of that normally.
     
  18. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #18
    No, you have two partitions on the same drive. Windows names them C: and D:, because that's fundamentally how Windows is designed, but they are not drives. They are partitions (logical volumes) on the same physical disk drive. If the disk drive malfunctions, then all your partitions (C: and D:) fail at once.

    You may never encounter the term volume in Windows, because it always presents them as drive letters, as if they were real physical disk drives. The name of the volume, its volume label, plays little or no role in the Windows user interface.

    Mac OS is the opposite, and has always been so. Physical drives, hence drive letters, have little or no visible role. Volume names of the actual mounted partition are what Mac OS X shows.

    If you were interested in the physical drive's driver, it wouldn't be a letter. It would be a device located in the /dev directory, usually with a name starting with 'disk'. As in this command-line:
    Code:
    ls -l /dev/disk*
    
    There will be a logical driver for each partition, too. Its name ends with s and a number.

    You're not expected to know or care about drivers (or physical drives) or their pathnames in order to be an everyday user of Mac OS X. Only admins or programmers might care.


    No, having drive letters isn't inherently helpful. Having multiple partititions available as logical drives is helpful.

    I've partitioned my drives for years and years, often into more than two. I have always found this helpful. I have never needed to refer to them by letters, so I can't see how letters are at all helpful.


    If you have always thought of them as drives with letters, it can be difficult to get used to the other way (partitions with names only when mounted).

    As already mentioned, you can name your partitions C and D if you prefer.
     
  19. Rik. macrumors newbie

    Rik.

    Joined:
    Dec 27, 2011
    #19
    It seemed to me that sydde was saying that there were no indications that you have partitions.
    Because he said 'should I have to have drive letters for each of those'.
    This indicated to me that there was no indication on the partitions.

    So, from what you say Mr Dark Dragon, the volumes (partitions) have names rather than drive letters.

    That makes sense and I can understand that.

    Thanks very much, so far, everyone.
     

Share This Page