need help getting out of a Terminal sudo command

I did something a bit foolish and followed a suggestion by a level one user from a different Apple discussion thread, and a link posted by that user, without knowing what I was really getting into to. I know, this deserves admonishment, but at this point I just need help safely getting out of this without doing further damage to files.


Here's what happened: I connected and opened an external HD folder for the first time after having used Time Machine to back up on it, as I was planning to delete some files from that HD. Somehow the external HD sent old Time Machine files to the desktop Trash bin when I opened the HD--I'm thinking that's what happened, anyway, because last time I backed up with TM to the external HD, it deleted old files to make room for the new (and I don't have TM files on my internal storage). Anyway, somehow these old TM files got to my Trash bin, and they wouldn't delete. That's common, I now understand. So I read a bit, tried a couple easy things that didn't work, then I found this, which was provided by the user in a different Apple discussion thread:

https://www.imore.com/how-force-empty-trash-your-mac-using-terminal


So I did that command in Terminal: sudo rm -R [space]....etc.


And that was nearly 24 hours ago. Since then, I'm finding the following things and I don't know what to do to safely get out of this mess:

1. Terminal is apparently still running the command, because when I click on the red dot at top left of the Terminal window, I get a prompt that says closing the window will terminate the running processes: rm, sudo ...So I cancel out because I'm afraid to terminate the process, because:

2. Right now, when I open the external HD, the whole thing looks empty. The files that were in the external HD are gone; the window is empty. Although in the terminal command I had only copied and pasted those files that were in the Trash. So I had a some wishful thinking that the Terminal process made it look empty but would restore those file icons soon enough...?

3. And, the desktop Trash bin is indeed now empty.

4. AND, when I open Paragon NTFS and look at the external HD capacity, it comes up the same as my internal storage capacity, but then it switches back to what it was, or would have been, with those old files deleted. (Also an odd thing that it switches back and forth.)

5. When I open Disk Utility, however, it shows an entire 2 TB (the capacity of the HD) as available on the external HD.


What should I do to safely get out of this? Do I cancel the Terminal process? How do I safely cancel it, if that's what should be done, without damaging anything else?


Have I lost all the other files that were on the external hard drive?


Thanks so much for help.

MacBook Pro TouchBar and Touch ID, macOS Sierra (10.12.6), MacBook Pro 2016

Posted on Jan 6, 2018 4:39 PM

Reply
19 replies

Jan 6, 2018 5:27 PM in response to vishnupriya

vishnupriya wrote:


Ok. So is there is anything to reply to get it to repopulate the other files to the external HD? (Assuming it has already deleted the ones from the Trash, since the Trash is empty.) Because it seems those files shouldn't be gone, right?

From what you posted, it shouldn't have deleted anything that was not in the Trash on that external hard drive. However, you haven't shown me the actual command you entered, so I can't say for sure.


By "up arrow" I mean the key on your keyboard with an upward pointing arrow. For me, it is on the bottom, right side of the keyboard.

Pressing Up Arrow in Terminal will reprint the last used command. Pressing again will go to the next previous command.

Jan 6, 2018 6:17 PM in response to vishnupriya

This is what it is waiting to confirm:

override rw-r--r-- root/wheel restricted,uchg for /Volumes/Vishnupriya Storage-TM 5/.Trashes/501/2015-10-18-232700/Macintosh HD/System/Library/CoreServices/boot.efi?

There is a flag set on the file to prevent deleting or changing. It is asking you to confirm that it should be deleted.


I think you should cancel the command with Ctrl-C.

Then, post the full command that you entered by using the Up Arrow, copy the full line, and paste it into a reply, here.

Once you have copied the command, close the window so that you don't accidentally run it again.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

need help getting out of a Terminal sudo command

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.