Operating System - HP-UX
1833841 Members
3235 Online
110063 Solutions
New Discussion

How To Delete Files without Names or with special Characters?

 
SOLVED
Go to solution
Peinelt
Occasional Contributor

How To Delete Files without Names or with special Characters?

Hi,

how can i delete a file without a name or with a name which consists of not printed special characters?
I tried to rm the inode, but no success..

any suggestions?

thx!
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: How To Delete Files without Names or with special Characters?

You can use "rm -i *", responding no to all the files you want to keep and yes to the nameless/special character files.


Pete

Pete
Borislav Perkov
Respected Contributor

Re: How To Delete Files without Names or with special Characters?

Hi,
You can use File Manager from DCE session, and delete the appropriate files. Don't forget to empty trash.
Regards,
Borislav
Jairo Campana
Trusted Contributor
Solution

Re: How To Delete Files without Names or with special Characters?

>tes||% (file with characters special)
159518 -rw-r--r-- 1 root other 0 Nov 18 10:53 test%

find . -inum 159518 -exec rm {} \;
legionx
john korterman
Honored Contributor

Re: How To Delete Files without Names or with special Characters?

Hi,
you can remove a file by its inode like this:
# ls -i ./testfile
3555 ./testfile
# find . -inum 3555 -exec ls -l {} \;

If sure that it is the correct file, then
# find . -inum 3555 -exec rm {} \;
to remove it. Is that how you did it?

regards,
John K.
it would be nice if you always got a second chance
Peinelt
Occasional Contributor

Re: How To Delete Files without Names or with special Characters?

thx :-)

the solution
find . -inum 145258 -exec rm {} \;
works!
Peinelt
Occasional Contributor

Re: How To Delete Files without Names or with special Characters?

many solutions are given