Remove oddly named file


 
Thread Tools Search this Thread
Operating Systems Solaris Remove oddly named file
# 1  
Old 09-30-2015
Remove oddly named file

I accidentally saved a txt file in vi with the name ":q!".

no amount of regex tomfoolery I can think of will allow me to remove the file.

anyone got any ideas?
# 2  
Old 09-30-2015
rm ':q!'
This User Gave Thanks to Corona688 For This Post:
# 3  
Old 09-30-2015
id10t

I are one. Just so you know I DID try that.... lol

thnx
# 4  
Old 09-30-2015
I've experienced similar instances.

If there are a small number of files in the directory then:

Code:
rm -i *

will allow you to step through all files answering 'n' until you get to the culprit and say 'y'.
# 5  
Old 09-30-2015
Show us the output from the command:
Code:
printf 'XXX%sXXX\n' *:*|od -bc

when run in that directory.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Non printing option in sed is behaving oddly

Hi I'm having a problem with a sed command that I thought I was using correctly but apparently that's not the case. I was hoping someone here could point out what it is I am doing wrong? I am using the print, no print option for a matched pattern in sed. Everything seemed to be working fine... (2 Replies)
Discussion started by: harveyclayton
2 Replies

2. UNIX for Beginners Questions & Answers

Non printing option in sed is behaving oddly

Hi I'm having a problem with a sed command that I thought I was using correctly but apparently that's not the case. I was hoping someone here could point out what it is I am doing wrong? I am using the print, no print option for a matched pattern in sed. Everything seemed to be working fine... (5 Replies)
Discussion started by: Paul Walker
5 Replies

3. Shell Programming and Scripting

Deleting file named *

Hi, There is a file by name '*' in a hp-ux box. How can i delete the same? -rw-r--r-- 1 wleadm dba 1531 Jul 24 08:49 * need to delete this file named * without deleting any other file. Please help. (9 Replies)
Discussion started by: sam_bd
9 Replies

4. Shell Programming and Scripting

Cant able to delete file named '\'

Hi folks Please help to delete the file -rw-r--r-- 1 sri sri 157 Dec 13 04:42 \ here unexpectedly "\" is created. if am deleting using > rm \ --i cant able to delete by using the command ******* here is the output i got **** sri:> cat \ > please help me how to delete ... (1 Reply)
Discussion started by: coolboy98699
1 Replies

5. Shell Programming and Scripting

sed behaving oddly, repeats lines

Hi, all. Here's the problem: sed '/FOO/,/BAR/p' That should print anything between FOO and BAR, right? Well, let's say I have file.txt that contains just one line "how are you today?". Then I run something like the above and get: $ sed '/how/,/today/p' file.txt how are you... (9 Replies)
Discussion started by: pereyrax
9 Replies

6. Shell Programming and Scripting

pipe to file named with date

I would like to pipe (redirect ? - what is the right term?) the output of my script to a file named with the current date. If I run this at a command prompt: date +'%Y%m%d" ...it returns "20110429" OK, that's good... so I try: ./script.sh > "'date +%Y%m%d'.csv" I get a file... (1 Reply)
Discussion started by: landog
1 Replies

7. HP-UX

remove named pipes

Hi, Please help me on this. I am creating a named pipe in a kshell script. I am using mkfifo pipe_name command to create the pipe. I want to remove the named pipe after my work is completed. How can i do that. (8 Replies)
Discussion started by: chintapalli001
8 Replies

8. UNIX for Dummies Questions & Answers

Named Pipe contents to a file

I want to copy the contents of a named pipe to a file. I have tried using: cat pipe.p >> transcript.log but I have been unsuccessful, any ideas? (4 Replies)
Discussion started by: carl_vieyra
4 Replies

9. UNIX for Dummies Questions & Answers

trying to delete a file named -e

I've been trying in vain to delete a file that I accidentally created. The name of the file is -e of course, everything I attempt to do with the rm command (rm -i * for example) comes back with: rm: illegal option -- e usage: rm file ... Any suggestions on what I can do to remove this... (3 Replies)
Discussion started by: steelrose
3 Replies
Login or Register to Ask a Question