deleting file that isn't really there


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers deleting file that isn't really there
# 1  
Old 07-05-2007
deleting file that isn't really there

sorry about the title -

I have a directory where a file is showing with ls or ls -l but if I try to reference it - I get the message that it isn't there. It is as if the directory structure isn't matching the actual content.

Right now, I have two files of same name showing in the directory - one real, one this other situation - if I rename the real one - then any attempt to work with the other one is "file not found".
it happens to be in /var/adm/cron with the file queuedefs
-r--r--r-- 1 bin bin 51 Mar 26 2004 .proto
prw------- 1 root root 0 Jul 5 10:32 FIFO
-rw-r--r-- 1 root root 187087 Jul 5 12:15 OLDlog
-r--r--r-- 1 root sys 18 Apr 25 16:13 at.allow.orig
-rw-rw-rw- 1 root sys 0 Apr 25 16:13 at.deny
-r--r--r-- 1 bin bin 18 Apr 25 16:10 cron.allow
-rw-r--r-- 1 root root 2833 Jul 5 14:45 log
-rw-r--r-- 1 root sys 207 Apr 19 09:41 queuedefs
-rw-rw-r-- 1 root sys 207 May 2 10:00 queuedefs


How do I clean this up?

Lisa
HP-UX 11.23 i64
# 2  
Old 07-05-2007
The first (very simple) thing I would try is to move one of the files:

Code:
mv que* tempfoo

Then, I would try to move the other one with wildcards:

Code:
mv qu* newfoo

or

Code:
mv *qu* newfoo

...and see what happens.

Maybe there are some hidden special chars in one of the filenames?
# 3  
Old 07-05-2007
you guys are so smart.
that was it - some char I couldn't see I guess.
I mv the good one; rm *que* the bad one; and moved back the good one.
all OK now.

thanks again!
# 4  
Old 07-08-2007
so what the "p" permission is for in:

Code:
prw------- 1 root root 0 Jul 5 10:32 FIFO

THX
# 5  
Old 07-08-2007
Quote:
Originally Posted by aladdin
so what the "p" permission is for in:

Code:
prw------- 1 root root 0 Jul 5 10:32 FIFO

THX
P means that the file in question is a fifo. These were originally called "named pipes" and the p meant pipe.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash looking in different directory for file that isn't referenced in command

When I run the below bash I get the expected output, which is the sum of all matching targets less than 20 in $file1. The filename in the directory is fixed (in bold). for file1 in /home/cmccabe/Desktop/test/panel/reads/16-0000_EPIL70.txt ; do bname=`basename $file1` ... (3 Replies)
Discussion started by: cmccabe
3 Replies

2. Linux

X Window isn't running

X Window isn't working. When I ran startx I got an error message as shown in file attachment xwndow.png Accordingly, I removed /tmp/.X0-lock as reflecting in the attchment. Then again I ran the command and 2 more commands (shown in the attachment xwndow1.png) but they failed too. Any... (2 Replies)
Discussion started by: ravisingh
2 Replies

3. UNIX for Dummies Questions & Answers

Deleting a pattern in UNIX without deleting the entire line

Hi I have a file: r58778.3|SOURCES={KEY=f665931a...,fw,221-705}|ERRORS={16_1:T,30_1:T,56_1:C,57_1:T,59_1:A,101_1:A,115:-,158_1:C,186_1:A,204:-,271_1:T,305:-,350_1:C,368_1:G,442_1:C,472_1:G,477_1:A}|SOURCE_1="Contig_1092402550638"(f665931a359e36cea0976db191ff60ff09cc816e) I want to retain... (15 Replies)
Discussion started by: Alyaa
15 Replies

4. Shell Programming and Scripting

awk - writing matching pattern to a new file and deleting it from the current file

Hello , I have comma delimited file with over 20 fileds that i need to do some validations on. I have to check if certain fields are null and then write the line containing the null field into a new file and then delete the line from the current file. Can someone tell me how i could go... (2 Replies)
Discussion started by: goddevil
2 Replies

5. Shell Programming and Scripting

awk isn't working

awk 'BEGIN{print '1.2449'**0.5}' awk: line 1: syntax error at or near * can someone help me troubleshoot the above command? i'm trying to do the square root of 1.2449. this command works on Red Hat, but for some reasonn isn't working on kubuntu (latest version). shell is bash. i... (3 Replies)
Discussion started by: SkySmart
3 Replies

6. Solaris

IP Forwarding on Solaris 10 (should be simple, but isn't!)

I'm having a hard time getting IP forwarding to work. I'll eventually have several interfaces, but all that matters for now is that two of them actually be able to IP forward. I have no network interfaces in the global zone, but both interfaces are in the same zone, Common. The IPs I've been... (0 Replies)
Discussion started by: cfalcon
0 Replies

7. UNIX for Dummies Questions & Answers

Why isn't this working? tsch-doit file

#! /usr/tsch foreach f (`cat contacts.list`) awk '{printf ($2 in a) ? ","$5 : (NR>1) ? RS $2 FS $5 : $2 FS $5; a} END{print e}' $f > $f_inter.map end My file: cat contacts.list is just a list of files. I get this error: doit_contacts2intermap.sh: Command not found. Thanks! (1 Reply)
Discussion started by: lost
1 Replies

8. AIX

crontab isn't excuting some commands

Greetings everybody, I have an IBM P520 AIX 5.3 server machine and trying to use crontab to periodically excute a script that contains a command belongs to my software (Fast/Tools SCADA software) I added the following line after using crontab -e 01 * * * * /mypath/myscript I have two... (3 Replies)
Discussion started by: ayman metwally
3 Replies

9. Solaris

grep -r isn't working

Hi, I was trying to use this particular option of grep grep -r 'Search_pattern' * This command should ideally search all the occurrences of Search_pattern recursively within a directory & print it on shell prompt. But this command is not doing what is expected. It just displays nothin! ... (8 Replies)
Discussion started by: harishmitty
8 Replies
Login or Register to Ask a Question