Operating System - HP-UX
1826645 Members
3561 Online
109695 Solutions
New Discussion

Re: opening a file with vi.. having a weird problem all of a sudden

 
SOLVED
Go to solution
mike worrell
Regular Advisor

opening a file with vi.. having a weird problem all of a sudden

for no reason i can't open anything on my test box with vi.. i get this weird error
fifrux27 /usr/local/bin>vi unmountcd.sh
"/u05/temp_upgrade" No such file or directory
the u05/temp_upgrade is an old file that was just deleted.
Any ideas on what I need to do.
I get this same error on every file i try to open with vi.
Thanks,
Mike
16 REPLIES 16
Steven E. Protter
Exalted Contributor
Solution

Re: opening a file with vi.. having a weird problem all of a sudden

/var filesystem is not mounted most likely

mount /var

try again.

If it says its corrupt:

fsck -F vxfs -o full /dev/vg00/lvol7

Use a real logical volume name instead of the one I used. Check /etc/fstab for the right one.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
harry d brown jr
Honored Contributor

Re: opening a file with vi.. having a weird problem all of a sudden

which vi

should return:
/usr/bin/vi

ls -l /usr/bin/vi
Should return:
-r-xr-xr-t 6 bin bin 249856 May 21 2002 /usr/bin/vi

then post the output of

what `which vi`

Are you root?

live free or die
harry d brown jr
Live Free or Die
mike worrell
Regular Advisor

Re: opening a file with vi.. having a weird problem all of a sudden

just tried your suggestion... it was mounted and i did the fschk command and that was ok.. still get that weird message from vi.. however i can do a "more" on the file just fine

Anything else you can think of?
I've never seen this before
mike worrell
Regular Advisor

Re: opening a file with vi.. having a weird problem all of a sudden

hi harry,

i did your commands too... below is output
fifrux27 />ls -l /usr/bin/vi
-r-xr-xr-t 6 bin bin 241664 Nov 14 2000 /usr/bin/vi
fifrux27 />which vi
/usr/bin/vi
Alex Lavrov.
Honored Contributor

Re: opening a file with vi.. having a weird problem all of a sudden

Can you try:
ll unmountcd.sh
file unmountcd.sh
ll /var/tmp
I don't give a damn for a man that can only spell a word one way. (M. Twain)
harry d brown jr
Honored Contributor

Re: opening a file with vi.. having a weird problem all of a sudden

WHat is the output of these commands:

ls -l /usr/local/bin/unmountcd.sh

alias

what `which vi`

live free or die
harry d brown jr
Live Free or Die
harry d brown jr
Honored Contributor

Re: opening a file with vi.. having a weird problem all of a sudden

also, try this:

/usr/bin/vi /usr/local/bin/unmountcd.sh

live free or die
harry d brown jr
Live Free or Die
Tony Scully_2
Valued Contributor

Re: opening a file with vi.. having a weird problem all of a sudden

Mike,

Please post the output of these three cmds:

file /usr/bin/vi

what /usr/bin/vi |head

env

whoami


Thanks,

Tony
You CAN do that on HP
mike worrell
Regular Advisor

Re: opening a file with vi.. having a weird problem all of a sudden

here ya go Tony
fifrux27 />uname -a
HP-UX fifrux27 B.11.11 U 9000/800 file 1311 unlimited-user license
fifrux27 /> file /usr/bin/vi
file: cannot open
/usr/bin/vi: PA-RISC1.1 shared executable dynamically linked
fifrux27 />what /usr/bin/vi | head
/usr/bin/vi:
$Revision: B.11.11_LR
Fri Oct 27 00:57:19 PDT 2000 $
$ B.11.11_LR Oct 27 2000 00:57:16 $
fifrux27 />env
_=/usr/bin/env
TMPDIR=/u05/temp_upgrade
MANPATH=/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/u
sr/local/man/%L:/usr/local/man:/opt/upgrade/share/man/%L:/opt/upgrade/share/man:
/opt/pd/share/man/%L:/opt/pd/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/o
pt/pd/share/man/%L:/opt/pd/share/man:/opt/resmon/share/man:/opt/hparray/share/ma
n/%L:/opt/hparray/share/man:/opt/graphics/common/man:/opt/scr/share/man:/usr/dt/
share/man://opt/perl/man:/opt/ignite/share/man/%L:/opt/ignite/share/man:/opt/aud
io/share/man:/opt/ansic/share/man/%L:/opt/ansic/share/man:/opt/langtools/share/m
an/%L:/opt/langtools/share/man:/opt/image/share/man:/opt/imake/man:/opt/perf/man
/%L:/opt/perf/man:/opt/cobol/cobdir/man:/opt/hpnpl//man
PATH=/usr/local/bin:/usr/sbin:/usr/bin:/opt/ansic/bin:/usr/ccs/bin:/usr/contrib/
bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/upgrade/bin:/opt/fcms/bin:/usr/bin/X
11:/usr/contrib/bin/X11:/opt/pd/bin:/opt/resmon/bin:/opt/graphics/common/bin:/op
t/scr/bin:/opt/atok/bin:/opt/egb/bin://opt/perl/bin:/usr/sbin/diag/contrib:/opt/
vje/bin:/opt/ignite/bin:/opt/langtools/bin:/opt/imake/bin:/opt/perf/bin:/opt/cob
ol/bin:/opt/hpnpl//bin:/sbin:/home/root
COLUMNS=80
EDITOR=vi
LOGNAME=root
ERASE=^H
PS1=$NODE $PWD>
SHELL=/sbin/sh
NODE=fifrux27
HOME=/root
TERM=hp
PWD=/
TZ=EST5EDT
LINES=24
fifrux27 />whaomi
sh: whaomi: not found.
fifrux27 />whoami
root
fifrux27 />
john korterman
Honored Contributor

Re: opening a file with vi.. having a weird problem all of a sudden

Hi,
long shot: please post the output of
# alias

regards,
John K.
it would be nice if you always got a second chance
Tony Scully_2
Valued Contributor

Re: opening a file with vi.. having a weird problem all of a sudden

Mike,

Sorry for the typo!

Does it really do that 'cannot open' before returning the file details when you execute

file /usr/bin/vi

?

Seems like the shell is misbehaving a bit, can you also try

sh

vi anyfile

Cheers,
Tony
You CAN do that on HP
Alex Lavrov.
Honored Contributor

Re: opening a file with vi.. having a weird problem all of a sudden

OK:

TMPDIR=/u05/temp_upgrade

The question is:
Does "/u05/temp_upgrade" exists?

Two solutions:
1. Create /u05/temp_upgrade
2. export TMPDIR=/var/tmp

I don't give a damn for a man that can only spell a word one way. (M. Twain)
Patrick Wallek
Honored Contributor

Re: opening a file with vi.. having a weird problem all of a sudden

It does seem strange that the file command returned an error.

Tyr this:

# whence vi

This will show whether you are using an alias for vi.
mike worrell
Regular Advisor

Re: opening a file with vi.. having a weird problem all of a sudden

thanks for everyone's help.. i found it. i had the tmp directory set to /u05/tmp_upgrade for an oracle issue awhile back.
Tony Scully_2
Valued Contributor

Re: opening a file with vi.. having a weird problem all of a sudden

Alex,

I reckon you've got it there!

Tony
You CAN do that on HP
Oliver Stoklossa
Frequent Advisor

Re: opening a file with vi.. having a weird problem all of a sudden

Maybe a stupid suggestion, but do you have enough filespace left on the $TMPDIR?