Ok, somehow i've managed to create two .ksh files with the same name. Impossible i know but somehow i did it by mistake...
I was actually copying a file and renaming it as something else but as i was typing the copy name i hit the delete key by mistake and got the ^? characters in the file name and hit return by force of habit... e.g. test^?.ksh
When i did an 'ls -lrt' the file just shows up as "test.ksh"
I created another file with same name thinking it would overwrite it but no it created the file and it now when i now do an 'ls -lrt' i have the two .ksh scripts show up.
But if i do an 'ls-lrt test*.ksh it will only show up the good file that i created.
I'm not all that familiar with unix/aix and have no idea what i've done.
Can anyone give me some pointers on how to get rid of this phantom file i created...
I think your best bet is to copy the file again to another name entirely, then do rm tes*.ksh. I expect that will work.
cp test.ksh saved_test.ksh
rm tes*.ksh
Another option is to check your manpage for the "remove with confirmation" option for rm. In solaris it's -i, not sure if it's the same for aix. Then do rm -i * (of course do the correct switch if yours isn't -i) and respond "n" to all the files except the bad one, say "y" to that.
Then you may have to go with the rm -i * idea. Just be very careful to say no to all the files except for the exact one you want to delete. I believe that will work since the * by itself should fine every file in the directory. Since your bad file shows up when you do ls it should work.
I can't do that... I'm on a production box and don't think deleting all the ksh scripts would go down to well...
I managed to get it deleted in the end up. I have hummingbird exceed installed and was able to log on to the box using the ftp feature... I saw the file there and it was called test.ksh