Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 08-11-2005, 05:12 PM   #1 (permalink)
straightv6's Avatar
 
Not A Super Techie

Join Date: Dec 2003

Posts: 495

straightv6 is on a distinguished road

Default rm -[red].txt

how would i remove that file?

i keep getting a error saying "rm invalid option -- ["
__________________
1 fast and 1 slow
straightv6 is offline  
Old 08-11-2005, 05:37 PM   #2 (permalink)
straightv6's Avatar
 
Not A Super Techie

Join Date: Dec 2003

Posts: 495

straightv6 is on a distinguished road

Default

i tried putting it in quotes but i get the same error
__________________
1 fast and 1 slow
straightv6 is offline  
Old 08-11-2005, 06:09 PM   #3 (permalink)
 
Master Techie

Join Date: Apr 2004

Posts: 2,534

horndude is on a distinguished road

Default

you have to use escape characters, look at the bash man pages, backslash and quotes are needed I think to handle the [ and - signs

quick and dirty way, type mc, then find the file and hit F8
horndude is offline  
Old 08-11-2005, 09:59 PM   #4 (permalink)
 
Super Techie

Join Date: Dec 2004

Posts: 467

TheRecluse

Default

couldn't you just rename it, then delete?
__________________
TheRecluse is offline  
Old 08-12-2005, 03:25 AM   #5 (permalink)
straightv6's Avatar
 
Not A Super Techie

Join Date: Dec 2003

Posts: 495

straightv6 is on a distinguished road

Default

Quote:
Originally posted by TheRecluse
couldn't you just rename it, then delete?
i tried that already but it gave me a similar error
__________________
1 fast and 1 slow
straightv6 is offline  
Old 08-12-2005, 03:28 AM   #6 (permalink)
straightv6's Avatar
 
Not A Super Techie

Join Date: Dec 2003

Posts: 495

straightv6 is on a distinguished road

Default

Quote:
Originally posted by horndude
you have to use escape characters, look at the bash man pages, backslash and quotes are needed I think to handle the [ and - signs

quick and dirty way, type mc, then find the file and hit F8
the "Midnight Commander" did the trick. Is there a reason why i shouldn't use that to delete files?
__________________
1 fast and 1 slow
straightv6 is offline  
Old 08-12-2005, 08:05 AM   #7 (permalink)
 
Master Techie

Join Date: Apr 2004

Posts: 2,534

horndude is on a distinguished road

Default

no not at all, but learning the proper characters to do it with the command line would be good too
horndude is offline  
Old 08-12-2005, 09:16 AM   #8 (permalink)
 
Newb Techie

Join Date: Jul 2005

Posts: 6

gman2

Default

How did you originally create it? When I try it seems impossible

[root@server1 root]# pico -[red].txt
pico: invalid option -- [


gman2 is offline  
Old 08-14-2005, 09:14 AM   #9 (permalink)
straightv6's Avatar
 
Not A Super Techie

Join Date: Dec 2003

Posts: 495

straightv6 is on a distinguished road

Default

Quote:
Originally posted by gman2
How did you originally create it? When I try it seems impossible

[root@server1 root]# pico -[red].txt
pico: invalid option -- [

it was transferred from another computer
__________________
1 fast and 1 slow
straightv6 is offline  
Old 08-14-2005, 07:18 PM   #10 (permalink)
 
Master Techie

Join Date: Apr 2004

Posts: 2,534

horndude is on a distinguished road

Default

rm \- \[red\].txt
horndude is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On