force delete a file that doesn't exist

Asked by mr.peeters

i have a .doc file on my hard drive, downloaded from an email.
however i can't open this file anymore, and if i delete it i get an error message saying the file does not exist.
but it keeps on showing up on my hard drive every time i restart.
also when i try 'rm path_of_file' in terminal i get the same error: no such file exists.
how can i get rid of this annoying unexisting file?
thanks for helping!
d.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

Please tell the document and path name we can try to use terminal to check it...
also from which app do you see this document listed...

Revision history for this message
mr.peeters (mr-peeters) said :
#2

the path is /media/VILES/dude_meets_dude.doc
where VILES is the name i gave to a partition of my hard drive and "dude meets dude.doc" is the freaky file.
is see the document listed when i open my explorer window (this is win jargon for sure?!) - when i go to places for example and then select VILES i see all the folders and documents I stored on that partition of my HD, and the dude meets dude.doc is one of them.
i know i sound like a lunatic but untill yesterday i couldn't open the file in open office writer, neither in any other program.
today however, when i started up my computer, i could open it in open office writer, change things in there and everything.
but still can't delete it - when i try to rename or delete the error message says 'no such file or directory' - same when i try to force delete using terminal.
weird....
would be very cool if you could help me out - no big problem bu it's annoying me this unremovable file.
thx, d.

Revision history for this message
Greg Beam (ki7mt) said :
#3

Hi mr.peters,

Strange anomaly to say the least, however, to force delete the file, from a terminal, do the following:

cd /media/VILES
sudo rm -rf ./dude_meets_dude.doc

where the -r is recursive (may not be needed) the -f = force, coupled with rm = --force delete and sudo to ensure it's not a file permission issue on a normal user trying to delete / remove the file.

Assuming of course, you can can actually navigate to the files present directory.

Hope that helps.

KE1HA

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#4

Please also be sure your partition have no error on it

Open a Terminal from the menu Applications → Accessories → Terminal and type:

sudo touch /forcefsck

give your user password when requested, you don't see nothing when you type it, then press enter.

Then at next reboot of your pc the hard disk will be checked.

Hope this helps

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#5

Then if you are new to Ubuntu: read the Ubuntu Manual, it's very informative: http://ubuntu-manual.org/
Click on the "download Button" to download the latest PDF version.

Can you help with this problem?

Provide an answer of your own, or ask mr.peeters for more information if necessary.

To post a message you must log in.