Operating System - HP-UX
1834250 Members
1877 Online
110066 Solutions
New Discussion

Can't remove file (non-existent)

 
SOLVED
Go to solution
Wong Pang Hong
Occasional Contributor

Can't remove file (non-existent)

I have a problem in removing a file called "v4_crt_smo_st_data.sql". The error message is:
rm: v4_crt_smo_st_data.sql non-existent
phwong
5 REPLIES 5
Stefan Farrelly
Honored Contributor
Solution

Re: Can't remove file (non-existent)

Theres probably some funny characters in the filename.

cd to the directory the file is in and try inserting a ./ before the filename and a * after the sql at the end.

Or do ls -l | vis
To see the file and any funny characters in the filename.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Manuel Plaza
Regular Advisor

Re: Can't remove file (non-existent)

Hi,

If filename has unusual characters, if it's possible, you could try delete it with the "file manager" of CDE.

Regards
Bill McNAMARA_1
Honored Contributor

Re: Can't remove file (non-existent)

You can remove it by inode number otherwise. An example is taken from previous posts on the subject:

ll -i (to find the inode number)

substitute the inode number in place of the # below;

find . -xdev -inum # -exec ll {} \;
find . -xdev -inum # -exec rm -i {} \;


Note, it is prefered to run the find from the filesystem your are in not from / becuase it is likely that the inode number will appear in more than one filesystem.

Later,
Bill
It works for me (tm)
Herve BRANGIER
Respected Contributor

Re: Can't remove file (non-existent)

Hi

You may have some nonprinting characters in the
file name. To see them use ls -b.

To delete them you can use :

rm -i "`ls -b BEGINNIG_OF_FILENAME`"

HTH

Herv?

ConnieK
Regular Advisor

Re: Can't remove file (non-existent)

I have also run into this problem. I simply "cd" to the directory and do:

#rm -i

This is an interactive command that will ask you at each file instance name if you want to remove it. When you get to the on you want removed, answer "y". That's it!
Do a ^C to get out of "rm".

Hope this helps you.
Independent by nature