That's interesting. Assuming that's all the files ls found, there are no vi config files in your HOME directory. So bad config file is apparently not the explanation.
Does vi work for any other users on your system? Is there a sysadmin who maybe set up something "different" about how vi runs?
Try to figure out exactly what is happening when you enter the "vi" command. For example (results will be different on your system):
Post what the file command says when you track down what is being run. In my case, it's an executable program. In your case, who knows? My suspicion is it might be a shell script.
Hi,
I unable to open any file using Vi editor,constantly getting the following error,
vi log.log
*** glibc detected *** malloc(): memory corruption: 0x081af510 **
uname -a
Linux sekac092 2.6.5-7.244-bigsmp #1 SMP Mon Dec 12 18:32:25 UTC 2005 i686 athlon i386 GNU/Linux
Also Note
ls... (8 Replies)
Hi all,
I have a shell script that i started editing, only in the midst of which i tried to save the changes i found that the file wasnt been provided with write/execute permissions.
I later have redone the changes and saved the file-
Just curious to know if there was any command wherein... (5 Replies)
helo
I install my product for koren language
I m uisng RHEL -4 operating system
now problem is whenever I open any file
vi filename
I got following error on the screen
E557: Cannot open termcap file
'vt100' not known. Available builtin terminals are:
builtin_ansi
... (1 Reply)
i have following query
e.g i want the VI Editor cursor at line number N instead of 0 while opening the file from unix prompt.
vi filename ??????
Can anyone help? (4 Replies)
Hi,
I am facing a problem regarding .csv file, my script does not read .csv file and if i open this file in vi editor and perform :wq option then only my script reads the .csv file.
Thanks (5 Replies)
Hi there! I'm developing a program that allows the user to open and edit files using both an editor and the terminal. Once the user has finished editing the file an update is sent to the logbook that compares the file before and after it was edited - this can only be done if the file is closed (I... (23 Replies)
Discussion started by: cherryTango
23 Replies
LEARN ABOUT OPENSOLARIS
getvfsfile
getvfsent(3C) Standard C Library Functions getvfsent(3C)NAME
getvfsent, getvfsfile, getvfsspec, getvfsany - get vfstab file entry
SYNOPSIS
#include <stdio.h>
#include <sys/vfstab.h>
int getvfsent(FILE *fp, struct vfstab *vp);
int getvfsfile(FILE *fp, struct vfstab *vp, char *file);
int getvfsspec(FILE *, struct vfstab *vp, char *spec);
int getvfsany(FILE *, struct vfstab *vp, struct vfstab *vref);
DESCRIPTION
The getvfsent(), getvfsfile(), getvfsspec(), and getvfsany() functions each fill in the structure pointed to by vp with the broken-out
fields of a line in the /etc/vfstab file. Each line in the file contains a vfstab structure, declared in the <sys/vfstab.h> header, whose
following members are described on the vfstab(4) manual page:
char *vfs_special;
char *vfs_fsckdev;
char *vfs_mountp;
char *vfs_fstype;
char *vfs_fsckpass;
char *vfs_automnt;
char *vfs_mntopts;
The getvfsent() function returns a pointer to the next vfstab structure in the file; so successive calls can be used to search the entire
file.
The getvfsfile() function searches the file referenced by fp until a mount point matching file is found and fills vp with the fields from
the line in the file.
The getvfsspec() function searches the file referenced by fp until a special device matching spec is found and fills vp with the fields
from the line in the file. The spec argument will try to match on device type (block or character special) and major and minor device num-
bers. If it cannot match in this manner, then it compares the strings.
The getvfsany() function searches the file referenced by fp until a match is found between a line in the file and vref. A match occurrs if
all non-null entries in vref match the corresponding fields in the file.
Note that these functions do not open, close, or rewind the file.
RETURN VALUES
If the next entry is successfully read by getvfsent() or a match is found with getvfsfile(), getvfsspec(), or getvfsany(), 0 is returned.
If an end-of-file is encountered on reading, these functions return -1. If an error is encountered, a value greater than 0 is returned. The
possible error values are:
VFS_TOOLONG A line in the file exceeded the internal buffer size of VFS_LINE_MAX.
VFS_TOOMANY A line in the file contains too many fields.
VFS_TOOFEW A line in the file contains too few fields.
FILES
/etc/vfstab
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |Safe |
+-----------------------------+-----------------------------+
SEE ALSO vfstab(4), attributes(5)NOTES
The members of the vfstab structure point to information contained in a static area, so it must be copied if it is to be saved.
SunOS 5.11 12 Mar 1997 getvfsent(3C)