ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I was wondering, is there a maximum record width for a file in Linux? I have plans for a very large file that is a little over 200,000 bytes wide and over 43,000 bytes long. Could Linux store a file such as this? I'm not worried about the lenght since I know that is a non-issue, I'm only worried about the width.
I've just created a file with 100 records of size 200000 (just asked Python to write 100 times the same string and got a file of 20Mb). Nothing went wrong. The only thing I can imagine is that 200,000 x 43,000 is about 8 Gb, so you have to be sure that your kernel and filesystem can manage files of that size (which, I think, is the case for kernels from 2.4)
A file that is really that large and that wide, and not "sparse?" A file where you are not storing "a bunch of zeroes?" Rare, but possible.
Could the file not simply be stored as multiple, numbered files, in one directory? Upon reaching the end of one file, the application could search for the next one, switch to it, and return the "next record" from that file.
Okay... it still might be more manageable if the process wrote a certain amount of data to one file, then switched to the next file, periodically. A single file that is of exceptionally large size is rather ponderous to handle.
There's no such thing as a "record" in Linux, per se. Like Unix which inspired it, all files in Linux are made up of bytes, not records. As far as the OS and the file system is concerned, any file is just a string of bytes.
That's why everyone here is talking only in terms of file size limitations (in bytes).
It's entirely up to the software application to organize this string of bytes in terms of records within the file. Depending on what specific applications you're using to manipulate the file, there may be record width limitations.