 |
 |
Using Terminal to delete a file?
|
 |
|
 |
|
Senior User
Join Date: Nov 2003
Status:
Offline
|
|
Hi, I have an old Adobe GoLive CS folder that will cause OS X to crash if I try to empty the trash.
I get a spinning beach ball and I cannot force quit the Finder or use any other applications. My only solution is to hold down the power button to turn of the comp.
Since I cannot figure out a way to delete this file via OS X, is the next step to delete the file with RM in terminal?
TIA
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status:
Offline
|
|
rm -rf /path/to/foldername
Be very very careful with rm -rf.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Location: Earth
Status:
Offline
|
|
Try to repair the disk/permissions with Disk Utility and see if this helps.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Sep 2005
Location: Canada... be nice, eh?
Status:
Offline
|
|
A little trick I use for RM, is to navigate to the directory it is in first. Then ls just to make sure I am in the right directory. Then when using the RM command as mentioned above, start typing the folder name and hit the TAB key. Terminal will prefill the folder name for you, including the correct way to show any spaces. Less chance of a typo or accidently putting in the wrong path...
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 2002
Location: New York, NY
Status:
Offline
|
|
Try to repair the disk/permissions with Disk Utility and see if this helps.
That would be a complete waste of time.
You can only repair the permissions of files installed by Installer. Also, even if this file was installed by Installer, it would still not work since it is no longer in its original location.
|
|
Vandelay Industries
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status:
Offline
|
|
Repairing permissions would be a complete waste of time. Repairing the disk obviously wouldn't, since that's where the problem is.
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Dec 2000
Status:
Offline
|
|
There is no way that permissions could cause OS X to crash when trying to empty the trash.
DiskWarrior is what you need.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 2002
Location: New York, NY
Status:
Offline
|
|
Originally Posted by TETENAL
Repairing permissions would be a complete waste of time. Repairing the disk obviously wouldn't, since that's where the problem is.
You're right. I misread the suggestion as repairing disk permissions not repairing the disk and permissions.
|
|
Vandelay Industries
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Sep 2003
Location: Louisiana, US
Status:
Offline
|
|
there are some directories where you will not have permission to modify the files. In these cases you will have to:
sudo rm -rf /path/to/file.xxx
>enter admin password<
or if you have a lot of these to do in different directories you can do this:
sudo -s
rm -rf /path/to/file.xxx
the second example will save the password for as long as you have that terminal window open, so be VERY careful!!!
And with both cases, do not use either command unless you are 100% of what you are deleting!!
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Oct 2006
Status:
Offline
|
|
I tend to use: rm -rfi
Still dangerous, but it does give you one last chance to bail out (or confirm).
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Dec 2000
Status:
Offline
|
|
Easy, no-chance-of-****ing-up method:
1. Open Terminal window
2. Type 'sudo rm -rf ' (Yes, that is a space on the end. Do not press enter.)
3. Drag the offending folder into the terminal window. Its path should be entered after the text you have typed.
4. Press enter/return.
5. Type your admin password.
6. Wait until the prompt appears again (may take some time).
7. Quit Terminal.
No fuss... no chance of deleting the wrong thing by typing the commands wrong.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|