0

There is a command to erase a file without send it to the trash?

I am pretty sure that i don't need some files anymore. I want to clean my storage. Do I need to send those files to the trash?

  • Do you mean something other than the rm command? – David Anderson Apr 26 '16 at 15:14
  • Can i select my files and use this command? I'm starting with MacBooks. My brother gave me his old one and told me i can erase all files. – vanedias Apr 26 '16 at 15:20
  • @vanedias So you mean delete from Finder? - although in the case you five I would create a new user for you and delete your brother as a user – Mark Apr 26 '16 at 15:23
  • Yes, i mean from finder, thanks, i will try delete his account. :D – vanedias Apr 26 '16 at 15:31
  • Ah, to delete an account, you can just open System Preferences and delete the account including its files from there. – nohillside Apr 26 '16 at 15:40
1

I'm not sure how confident you're going to be using Terminal commands as a brand new user, so I wouldn't recommend doing anything that can permanently, no questions asked, delete data from your hard drive.

It would be far safer to delete files to the Trash using the standard Finder command
Cmd ⌘ Backspace ← .

Then when you are happy you really didn't need the files, again from the Finder
Cmd ⌘ Shift ⇧ Backspace ← will empty the trash.

That in itself wouldn't securely erase, preventing all recovery efforts; but from a standard user perspective, they would be gone & the hard disk space freed up to be used again.

  • You could then use Disk Utility, or from Terminal, diskutil to erase the free space on the volume from at a minimum of writing zeros or stronger level of erasure. – user3439894 Apr 26 '16 at 15:42
  • Sure - though it could be on an SSD... really I just wanted to avoid a new user wanting free reign with dangerous stuff like sudo rm -rf – Tetsujin Apr 26 '16 at 15:50
  • I agree, and if it's an SSD, I would do any unnecessary free space erasures. – user3439894 Apr 26 '16 at 16:02
  • There is the additional 'you really ought to wipe the entire machine & start over as its new owner' argument, I just thought that was too far beyond the brief of the question. – Tetsujin Apr 26 '16 at 16:06
  • Yes, I would have already none that and started fresh. BTW, I left out the "not" if front of "would" in my last comment. – user3439894 Apr 26 '16 at 16:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .