unable to open a .log(4MB) file in vi

am unable to open a .log file which is 4MB size.

please post the output of "df -h" or "df -k".

Filesystem size used avail capacity Mounted on
/dev/dsk/c1t0d0s0 24G 9.9G 14G 42% /
/dev/dsk/c1t0d0s7 16G 5.7G 10G 37% /usr
/proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
fd 0K 0K 0K 0% /dev/fd
/dev/dsk/c1t0d0s4 9.6G 1.5G 8.1G 16% /var
swap 5.9G 168K 5.9G 1% /var/run
/dev/dsk/c1t2d0s0 69G 14G 54G 21% /home2
/dev/dsk/c1t2d0s1 66G 33G 32G 51% /home3
/dev/dsk/c1t0d0s5 9.6G 1.8G 7.8G 19% /tmp
/dev/dsk/c1t0d0s3 19G 4.0G 15G 21% /opt
/dev/dsk/c1t1d0s0 69G 12G 56G 19% /loadbuild
/dev/dsk/c1t1d0s1 66G 59G 6.3G 91% /home1
/dev/dsk/c1t3d0s0 69G 48G 20G 71% /home4
/dev/dsk/c1t3d0s1 66G 30G 35G 47% /home5
/dev/dsk/c1t0d0s6 48G 21G 26G 45% /export/home

Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c1t0d0s0 25206312 10422045 14532204 42% /
/dev/dsk/c1t0d0s7 16646570 5961025 10519080 37% /usr
/proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
fd 0 0 0 0% /dev/fd
/dev/dsk/c1t0d0s4 10092076 1546678 8444478 16% /var
swap 6153424 168 6153256 1% /var/run
/dev/dsk/c1t2d0s0 72301401 14816895 56761492 21% /home2
/dev/dsk/c1t2d0s1 68883610 34459562 33735212 51% /home3
/dev/dsk/c1t0d0s5 10092076 1849915 8141241 19% /tmp
/dev/dsk/c1t0d0s3 20174761 4159250 15813764 21% /opt
/dev/dsk/c1t1d0s0 72301401 12967873 58610514 19% /loadbuild
/dev/dsk/c1t1d0s1 68883610 61590102 6604672 91% /home1
/dev/dsk/c1t3d0s0 72301401 50260733 21317654 71% /home4
/dev/dsk/c1t3d0s1 68883610 31500221 36694553 47% /home5
/dev/dsk/c1t0d0s6 50432224 22166357 27761545 45% /export/home

Any error/exception u are getting ?

Have u ftp'ed the files from some other place ?

What is the value of:

  1. $EDITOR
  2. $TERM

please clean your swap filesystem! it is full!

swap 5.9G 168K 5.9G 1% /var/run

vi needs space in /var/run. the best thing to do is (if possible) a reboot (init 6). if you can't do a reboot, delete unneeded files in /tmp.

hth,
DN2

Is it taking time to open the file or vi displays that it is unable to open file ?

Probably to check that, you could press ctrl-c after opening the file in vi.

That way, partially file will be displayed in the editor.

IMHO, swap is only 1% used not 1% remaining. So, doesn't look like a swap issue.

venkatramana - Please post the error you are encountering in detail so that it can be persued further.

Thanks,
enc

first of all thx 4 ur kind responce...
when i open the file by vi editor..
again it is displaying the file name with
double inverted cotes...
when i hit enter,it is showing "the file is too big to open"...

This error occurs when the file size is greater than 2GB which vi cannot handle. But according to you the file is 4MB in size.

Do a du -h <your_file_name> to see its correct size.

Does vim help?

then how to open a file which is
greater than 2gb

wooops :o... my fault...

see the title of "error which i encounterd"..
i gave a wrong info that file is 4mb,
it's 4 gb.

Am quite interested to know out of curiosity that what are you trying to achieve opening such a huge file.

Is it just read the contents - more, less, etc should do

inline modification of values - sed would do that

check whether trailer is populated - tail would do

and with header - head would do

so what is that you want to do after opening the file ? :slight_smile:

it's a log file...and it is reading the conf file(through some methods)
so,i want to check what method is called,
after complition of one method..

i think this can be done by opening a complete file.......

but i can't.

If you are interested to view the file using vi, split the file into smaller parts that are managable by vi. Else try vim or as suggested above cat,more etc should do the trick.

yes....splitting the file....is working well..
once again ...thnk u all....

Funny, I had never heard of less before yesterday. Now I cannot seeem to avoid mentions of it.