Force deleting a file.
I have an IE file that I can't delete. Every time I try to delete it a message comes up saying that the document is being used in another task.
I have tried using the console, but to no avail, I'm using OSX.2.1 wit IE 5.2, does anyone know how to delete this file?
Thanks,
Matty.
I have tried using the console, but to no avail, I'm using OSX.2.1 wit IE 5.2, does anyone know how to delete this file?
Thanks,
Matty.
Comments
[code] sudo find path/of/the/file -name nameofthefile -print0 | xargs -0 rm -rf </pre><hr></blockquote>
copy and paste it into textedit, modify it to suit your needs, and off you go. It wants your password, because it is dangerous.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!
VERY DANGEROUS !!!!
Make sure you know what you are doing, and make sure you typed in the right path and the right name !!!! it can delete files you don't want if you type in the wrong things.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!
also, can't you move it to the trash ?
IF it is already in the Trash, use <a href="http://macchampion.com/arbysoft/" target="_blank">BatChmod</a>'s "Force Emptying Trash" function.
If you're not sure if you type in the right thing, just post it in here, I'm gonna check, and give you an O.K. ok?
sudo find path/of/the/file -name and Roll -print0 | xargs -0 rm -rf
The it came up with:
path/of/the/file: Roll: unknown option
"and Roll" is the files name.
So, any pointers? <img src="confused.gif" border="0">
[code] sudo find /users/flo/desktop/ -name "and Roll" -print0 | xargs -0 rm -rf</pre><hr></blockquote>
and use quotes for files with a space between them. "file name"
[ 11-04-2002: Message edited by: Defiant ]</p>
No such file or directory
What do I do?!??! This is really getting annoying now..
P.S. Thanks for the persistent help.
sudo rm -f (space)
And drag the undeletable file into terminal
(The space is a spacebar, don't type in "(space)")
Then hit enter...
And then enter your admin password (though you shouldn't need sudo in the first place)
Erm, why are you using IE in the first place?
[ 11-04-2002: Message edited by: chych ]</p>
davidlindsay% sudo rm -f/Users/davidlindsay/Desktop/\\ and\\ Roll
Password:
rm: illegal option -- /
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
Stiil doesn't work... "illegal option" WTF, I am the admin of this mac. Grrr
</pre><hr></blockquote>
use THIS !!
that before was VERY dangerous. it almost deleted your whole desktop...
<strong>Ok this is what I did, but it still doesn't work:
davidlindsay% sudo rm -f/Users/davidlindsay/Desktop/\\ and\\ Roll
Password:
rm: illegal option -- /
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
Stiil doesn't work... "illegal option" WTF, I am the admin of this mac. Grrr</strong><hr></blockquote>
Gah, I told you to put a space after the -f
should be:
sudo rm -f /Users/davidlindsay/Desktop/\\ and\\ Roll
Read!
If it's a directory make it -rf instead of -f
[ 11-04-2002: Message edited by: chych ]</p>
[ 11-05-2002: Message edited by: mattyj ]</p>