Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2gig File, Need Ttl Record Count & last 20 Records

Status
Not open for further replies.

saw15

Technical User
Jan 24, 2001
468
US
Good day ..

Running an extract out of Oracle 8i, on HP Unix 11.0.

File reaches two gig and then quits, I would like to get the total record count as well as extract the last 20 records of the file.

Help / example is much apprecated. File name is claim.txt.

Thanks again.
 
Hello saweens,

when creating a new filesystem (vxfs), the max filsize is
2GB. If you try to write more to a file it just quits with an error.
Solution: create a new filesystem (vxds) with rhe -o largefiles option. After that, you can create files as big as 128GB.

Hope that helps.
Regards

Gottfried

GOSUC@GMX.DE
 
If you can unmount the filesystem long enough to execute the command /usr/sbin/fsadm -F vxfs -o largefiles /dev/vgnn/rxxx (where vgnn is the name of the volume group and rxxx is the name of the raw logical volume), you don't have to recreate the filesystem.

If you have online advanced JFS, you can do it without unmounting the filesystem. Instead of specifying the the raw logical volume device file, you would specify the mount point of the logical volume. Then you have to edit /etc/fstab and specify the largefiles option (nolargefiles is the default).

You also can do it with sam.
 
Best option would be to create a new filesystem, but here are the answers to your direct questions :

List last 20 lines : tail -n 20 claim.txt

Count lines(records) : wc -l claim.txt
or if you want to use for input of other process, use
cat claim.txt | wc -l . Will them appear without filename next to it.



 
Is changing the largefiles option after the filesystem has been created and used buggy?

Backing up the current filesystem, deleting the filesystem, recreating the filesystem with the largefiles option, then restoring the filesystem would take much longer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top