Cannot delete files that are on my mac desktop

Joined
Sep 6, 2011
Messages
8
Reaction score
0
Points
1
Problem: I have four files that I cannot delete on my desktop. They are files that I downloaded (see screenshot picture). I cannot drag these files (they don't move). I have tried to delete by using Terminal with the sudo rm -rf command. I have tried to drag into Terminal but the files don't move. I have copied the files (which works) and tried pasting in Terminal, but they I get an message in Terminal as follows:

sam:.Trash jeffpeckham$ sudo rm -rf August 28, 2011.pdf.part
sam:.Trash jeffpeckham$ August 28, 2011.pdf
-bash: August: command not found
sam:.Trash jeffpeckham$ ALTO SAX CH#807 My Country Tis Of Thee.pdf.part
-bash: ALTO: command not found
sam:.Trash jeffpeckham$ ALTO SAX CH#807 My Country Tis Of Thee.pdf
-bash: ALTO: command not found
sam:.Trash jeffpeckham$ sudo rm -rfAugust 28, 2011.pdf.part

Anyone with any ideas? I can't figure this one out to save me.

Thanks,
Jeff
 

Attachments

  • Screen Shot 2011-09-06 at 1.55.11 PM.png
    Screen Shot 2011-09-06 at 1.55.11 PM.png
    37.2 KB · Views: 36

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Do this
Code:
# ls -l *.part

If this shows you JUST the files you are interested in deleting, then follow with
Code:
# rm -rf *.part

That should delete these files. You can also delete individual files by putting the file name is quotes, so it would be "August 28, 2011.pdf.part" for the first one..

If you get permission issues, you might have to prefix the above "rm -rf" command with "sudo", so it looks like "sudo rm -rf *.part"..
 
OP
J
Joined
Sep 6, 2011
Messages
8
Reaction score
0
Points
1
Thanks for your reply. I tried your suggestions. Nothing happened. Maybe I am doing something wrong? Here is a copy of my Terminal Session:

Last login: Tue Sep 6 14:12:07 on ttys000
sam:~ jeffpeckham$ # 1s -1 *.part
sam:~ jeffpeckham$ # rm -rf *.part
sam:~ jeffpeckham$ # rm -rf "August 28, 2011.pdf.part"
sam:~ jeffpeckham$ # 1s -1 "August 28, 2011.pdf.part"
sam:~ jeffpeckham$ sudo rm -rf "August 28, 2011.pdf.part"
sam:~ jeffpeckham$ sudo rm -rf August 28, 2011.pdf.part
sam:~ jeffpeckham$
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
You should run the commands without the # in front of them..and the first command is "el" "es", minus "el" ..those are not the number 1..

After your 5th command, did you check to see if the August 28, 2011.pdf.part is still on the Desktop?
 
OP
J
Joined
Sep 6, 2011
Messages
8
Reaction score
0
Points
1
Thanks for your reply again. I tried "l" instead of number "1". I did it for the first command as follows, but it did not find the file:

Jeff-Peckhams-MacBook-Pro:~ jeffpeckham$ ls -l *.part
ls: *.part: No such file or directory
Jeff-Peckhams-MacBook-Pro:~ jeffpeckham$
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
That's because you're working in your home directory - this is what the ~ symbolizes. Execute the following to change your working directory to the Desktop:
Code:
cd ~/Desktop
 
OP
J
Joined
Sep 6, 2011
Messages
8
Reaction score
0
Points
1
Ok. Thanks for clarification. I am working in Desktop now through Terminal. Here is what I got:
Jeff-Peckhams-MacBook-Pro:Desktop jeffpeckham$ ls -l August 28, 2011.pdf.part
ls: 2011.pdf.part: No such file or directory
ls: 28,: No such file or directory
ls: August: No such file or directory

Is this saying there is a problem since I have spaces in the file name? Didn't delete it after trying.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Yes, it is because there are spaces which either need to be escaped or accommodated for by wrapping the filename in quotation marks.

So, do one of the following with the filename:
Code:
ls -l August\ 28,\ 2011.pdf.part
or
Code:
ls -l "August 28, 2011.pdf.part"
 
OP
J
Joined
Sep 6, 2011
Messages
8
Reaction score
0
Points
1
Thanks for your reply. I tried your suggestion, but the files did not delete. I got this:

Jeff-Peckhams-MacBook-Pro:Desktop jeffpeckham$ ls -l August\ 28,\ 2011.pdf.part
ls: August 28, 2011.pdf.part: No such file or directory
Jeff-Peckhams-MacBook-Pro:Desktop jeffpeckham$ ls -l "August 28, 2011.pdf.part"
ls: August 28, 2011.pdf.part: No such file or directory
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
What is printed back when you execute the following:
Code:
ls -la
 
OP
J
Joined
Sep 6, 2011
Messages
8
Reaction score
0
Points
1
Jeff-Peckhams-MacBook-Pro:Desktop jeffpeckham$ ls -la
total 88
drwx------+ 4 jeffpeckham staff 136 Sep 6 21:36 .
drwxr-xr-x+ 34 jeffpeckham staff 1156 Aug 31 14:43 ..
-rw-------@ 1 jeffpeckham staff 43012 Sep 6 21:36 .DS_Store
-rw-r--r-- 1 jeffpeckham staff 0 Feb 22 2011 .localized
Jeff-Peckhams-MacBook-Pro:Desktop jeffpeckham$
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Those results would suggest that the files aren't there and thus, the Desktop doesn't seem to be refreshing properly. Have you rebooted the machine since?
 
OP
J
Joined
Sep 6, 2011
Messages
8
Reaction score
0
Points
1
It worked! I rebooted and the files are not on my desktop anymore. Only problem is, I wish I knew which of the above solutions worked. I am guessing that I was to reboot the system after each try? Thanks to all who helped me through this. Amazing forum!
 
Joined
Oct 25, 2004
Messages
712
Reaction score
13
Points
18
Location
Australia (American born)
Your Mac's Specs
MBP 15" 2006 | 2011 21.5in iMac-1tb-i5-12gig | iPhone 3gs
Ok... instead of starting a new thread because a "search" didn't work but deleting seems to be MY problem....

If I right-click and select Delete or Send to Trash I'm required to type in my password for everything. I'm getting pretty annoyed by this. How do I stop this from happening? I'm the admin.... Running Lion
 
Joined
Oct 25, 2004
Messages
712
Reaction score
13
Points
18
Location
Australia (American born)
Your Mac's Specs
MBP 15" 2006 | 2011 21.5in iMac-1tb-i5-12gig | iPhone 3gs
Well you found a post but no solution..... :\
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Are you getting a dialog saying that all files will be permanently deleted upon putting them in the Trash? If so, do the following:

1. Execute the following in Terminal to show hidden files:
Code:
defaults write com.apple.Finder AppleShowAllFiles TRUE ; killall Finder
That will show all hidden files in Finder.

2. Right-click .Trash in your home folder > Get Info.
3. Under Sharing & Permissions, ensure that your user has "Read & Write" permissions.
4. Close that box and execute the following in Terminal to rehide all hidden files/folders:
Code:
defaults write com.apple.Finder AppleShowAllFiles FALSE ; killall Finder
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top