1829581 Members
4112 Online
109992 Solutions
New Discussion

Tmp file too large

 
luigi coco
Occasional Contributor

Tmp file too large

I've got a problem vi. I get an error of "Tmp file too large" and I just can't seem to get around it. The file is around 650 meg in size. File System /tmp 450 meg
I must extent /tmp ????

thanks

 

P.S. This thread has been moved from HP-UX Technical Documentation to HP-UX > sysadmin. -HP Forum Moderator

16 REPLIES 16
Pete Randall
Outstanding Contributor

Re: Tmp file too large

According to the man page for vi, the max file size is:

"Maximum File Size
The maximum file length of 234,239 lines is silently enforced."

But it says it would be "silently enforced", so I don't think you've run into that limitation. Increasing /tmp seems like a reasonable next step.


Pete

Pete
Eknath
Trusted Contributor

Re: Tmp file too large

Hi luigi

This happens when the temporary editor file exceeds 268369920 bytes
(255Mbytes)

Either you can extend /tmp fils system or you can split the file to be viewed.

Cheers
eknath
luigi coco
Occasional Contributor

Re: Tmp file too large

I resize File System /tmp 800 Mb,
the problem persist.

Thank!!
Stephen Keane
Honored Contributor

Re: Tmp file too large

Does rather beg the question as to WHY you'd want to vi a 650 MByte file?
Joseph Loo
Honored Contributor

Re: Tmp file too large

hi,

do u really need to read that file? if not u may like to remove the file cause extending /tmp unnecessary may only create future problem.

if u must read it, maybe u should ftp the file and use wordpad to open it.

also, u may like to do something about your assignment of points.

regards.
what you do not see does not mean you should not believe
luigi coco
Occasional Contributor

Re: Tmp file too large

I want decreasing the dimension of the file
alertlog of DB ORACLE.

Thanks!!

Stephen Keane
Honored Contributor

Re: Tmp file too large

Is there anything in particular in the file that you are looking for, or just a general 'is there anything wrong' scan?

You can grep for lines of interest (if you know what you are looking for) or you can grep out lines of no interest (repeated, boring messages)

You could use more to page through the output, but that will take a while with a 650MByte file.

Vibhor Kumar Agarwal
Esteemed Contributor

Re: Tmp file too large

You can split in file in manageable chunks by using the split command.
Vibhor Kumar Agarwal
C. Beerse_1
Regular Advisor

Re: Tmp file too large

You can also have VI put its tmp file somewhere else: set ${TMP} (or was it ${TEMP}) to a directory with suficient space.

An (old, O'Reilly) book about vi tells me the option "directory" (or short: "dir") in ~/.exrc defines the storage for temporary documents. You can set this in a running vi using `: set directory /path/to/tmpdir`.

btw, it is also possible that VI uses the current directory (or the directory of the file) for temporary space, I could not find details in the HP-UX vi manpage.

Then there is `vim` (http://hpux.its.tudelft.nl/hppd/hpux/Editors/vim-6.3/ ) that's a vi-implementation with many more options.
make everything as simple as possible, not simpler (A.Einstein??)
Simon Hargrave
Honored Contributor

Re: Tmp file too large

If you want to shrink the alert log, then use ed: -

# wc -l alert.log
10000
# ed alert.log <1,1000d
w
q
EOF

# wc -l alert.log
9000

eg above the alert log is 10000 lines long. The "ed" script will delete the 1st 1000 lines and save the file.
Simon Hargrave
Honored Contributor

Re: Tmp file too large

Sorry just noticed, ed will not work. From the man page: -

The following size limitations apply: 256 characters per global command list, 64 characters per file name, and 32 MB characters in the buffer.

32MB file size limit.
Simon Hargrave
Honored Contributor

Re: Tmp file too large

Try this, to delete the 1st 1000 lines: -

cp alert.log alert.log.tmp
awk 'NR>1000' alert.log.tmp > alert.log
rm alert.log.tmp
Thayanidhi
Honored Contributor

Re: Tmp file too large

Do a "tail -xxxx > new_name"
Then remove the original name and mv the new_name to original name.

If you want view before you trim use split.

I think you can also do the same in SAM. open routine tasks and logs files. Add your file to list with recommended size. Then you should be able to trim from sam.

Regds
TT
Attitude (not aptitude) determines altitude.
Simon Hargrave
Honored Contributor

Re: Tmp file too large

The problem with tail is it's limited to how many lines it can process, a few thousand if I recall.
Stephen Keane
Honored Contributor

Re: Tmp file too large

tail uses a 20k buffer, anything over that and you are out of luck.
Devesh Pant_1
Esteemed Contributor

Re: Tmp file too large

If you really need to vi the file, here is a good way to do it
The way I liked best of doing this was by using this
command: "split -b 20m target"