Operating System - Linux
1753891 Members
7651 Online
108809 Solutions
New Discussion юеВ

how can i delete * like archive?

 
SOLVED
Go to solution
Manuales
Super Advisor

how can i delete * like archive?

Hi (again), now i do not kwnow how can i delete an * like archive, i don't kwnow why system has an * like file:

system@userone> ls -l
file1
file2
*
file3
file4
all files
file5

how can i delete a file named "*" ?

Thanks !!!
Manuales.
6 REPLIES 6
Tom Danzig
Honored Contributor
Solution

Re: how can i delete * like archive?

rm -i \*

Note the -i switch to rm. USE IT !!! This could prevent a disaster.
Patrick Wallek
Honored Contributor

Re: how can i delete * like archive?

If it is truly only a '*' in theh name, you can do:

# rm -i \*

The back slash (\) escapes the special meaning of the * character in the shell.
James R. Ferguson
Acclaimed Contributor

Re: how can i delete * like archive?

Hi Manuales:

The same technique we have discussed works here too! See:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=988269

Regards!

...JRF...
Geoff Wild
Honored Contributor

Re: how can i delete * like archive?

Also see this thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=955986

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Manuales
Super Advisor

Re: how can i delete * like archive?

Thanks all friends !!!

It worked !!!

Manuales.
Manuales
Super Advisor

Re: how can i delete * like archive?

Thanks !!!