? File is there or it's not ???

Get answers here.

Moderators: BBear, theunknownhost, flaguy

Post Reply
User avatar
Sapphyre
Official Test Penquin
Posts: 3337
Joined: Tue Nov 19, 2002 2:50 am
Location: Canada

? File is there or it's not ???

Post by Sapphyre » Fri Jan 18, 2008 4:59 pm

What is going on here? We can see the file listed, but says it's not there if we try to cat it or open it via browser

Code: Select all

[Fri Jan 18 11:56:24 root /home/l....tl/l .....c-www]
# ls -al|grep H*
-rw-r--r--    1 lll4cptl lll4cptl     3380 Jan 18 10:34 Healthcare2008.shtml


[Fri Jan 18 11:56:43 root /home/l....tl/l .....c-www]
# cat Healthcare2008.shtml
cat: Healthcare2008.shtml: No such file or directory



[18/Jan/2008:11:54:47 -0500] "GET /Healthcare2008.shtml HTTP/1.1" 404 214 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727)"

User avatar
Sapphyre
Official Test Penquin
Posts: 3337
Joined: Tue Nov 19, 2002 2:50 am
Location: Canada

Post by Sapphyre » Fri Jan 18, 2008 5:11 pm

More clues ... this account has no .htaccess file in place.

This works:
# cat Healthcare2008.shtm*

These fail:
# cat Healthcare2008.shtml

# cat Healthcare2008.*html

--------------------------------------
Other files work with the full .shtml extension:

# cat Eldersburg.shtml

--------------------------------------
Both give the same type of info

# file Healthcare2008*
Healthcare2008.shtml : HTML document text

# file Eldersburg*
Eldersburg.shtml: HTML document text

m2
Hard Drive Crasher
Posts: 767
Joined: Sun Nov 21, 2004 2:19 pm
Location: Lexington, KY

Post by m2 » Fri Jan 18, 2008 5:12 pm

A non-printable character in the name?

Try

Code: Select all

cat Health*


If it displays try

Code: Select all

cat Healthc*
, etc. until you find the culprit.

Greg
Hosting Superstar
Posts: 1807
Joined: Fri Apr 19, 2002 12:00 am
Location: Earth

Post by Greg » Fri Jan 18, 2008 5:16 pm

I really have no clue, but maybe the last character of the file extension is not an "L" (lowercase letter l), maybe it is a "1" (numerical)

.shtm1

That would explain why "cat Healthcare2008.shtm* " works while the others don't?

User avatar
Sapphyre
Official Test Penquin
Posts: 3337
Joined: Tue Nov 19, 2002 2:50 am
Location: Canada

Post by Sapphyre » Fri Jan 18, 2008 5:23 pm

WOW! That was weird.
It must have been some glitch when the file saved that the index did not recognize it correctly.

I did this and now the file works as expected:

cp -p Healthcare2008.shtml Healthcare08.shtml (failed)
cp -p Healthcare2008.shtm* Healthcare08.shtml (worked)
rm Healthcare2008.shtml (failed)
rm Healthcare2008.* (worked)
cp -p Healthcare08.shtml Healthcare2008.shtml

-------------------------------------

All praise the almighty wildcard ( * ) !!!!

Greg
Hosting Superstar
Posts: 1807
Joined: Fri Apr 19, 2002 12:00 am
Location: Earth

Post by Greg » Fri Jan 18, 2008 5:56 pm

It is still possible it was a numerical 1, and you then copied it and changed the name.

User avatar
Sapphyre
Official Test Penquin
Posts: 3337
Joined: Tue Nov 19, 2002 2:50 am
Location: Canada

Post by Sapphyre » Fri Jan 18, 2008 5:58 pm

I dunno? I copied and pasted from the screen ls to cat AND I actually did think of that and tried accessing it as Healthcare2008.shtm1 - which failed.

I checked for spaces after the 'l' too.

Greg
Hosting Superstar
Posts: 1807
Joined: Fri Apr 19, 2002 12:00 am
Location: Earth

Post by Greg » Fri Jan 18, 2008 6:00 pm

OK...i didn't realize you copied the ls output to the cat command.

I am wrong then.

User avatar
Arf
Official Test Penquin
Posts: 9103
Joined: Tue Apr 09, 2002 12:00 am
Location: IDAHO, USA
Contact:

Post by Arf » Fri Jan 18, 2008 6:20 pm

Try

# cp Healthcare2008.shtm<TAB> Healthcare2008.v2.shtml

Use the <TAB> key to let Linux fill in the rest. I'm with M2 in that there appears to be a non-printing character in after the "l"

I hope we're right M2, then we get a prize I'm sure.

User avatar
khimaira2
Nothing better to do.
Posts: 202
Joined: Mon Sep 20, 2004 12:19 pm
Location: Location: Location:

Post by khimaira2 » Sat Jan 26, 2008 2:32 am

This problem seems to be resolved, but since no one mentioned it, the first thing I would have tried is "ls -lq". Typically what are refered to as non-printing characters would be displayed with a "?".

What you see isn't always what you get.
Outside the box member

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest