On Sun, 2008-06-22 at 14:14 -0400, Mag Gam wrote:
> even seeking thru it requires a sequential scan, right?
If Linux FS systems work like real *IX, it depends. The underlying
C/system calls should be smart enough to calculate an offset that
traverses inode information to cause a direct access seek of the read
If you use a utility, it depends on if the utility is smart enough to
use the correct system calls or just does a sequential read until the
proper location is achieved. I *suspect* that most utilities are smart
enough to work the "fast" way.
You can test this for various utilities or applications.
dd if=<your file name> skip=<some large number> of=/dev/null count=1
should return *very* quickly. If not, that means it is stupid.
For output, the same. Just replace skip with seek.
Think of large database handlers. If they had to process sequentially,
there would be no fast ones unless the whole DB was cached.
> On Sun, Jun 22, 2008 at 1:57 PM, Frank Cox <email@example.com>
> On Sun, 22 Jun 2008 11:20:22 -0400
> Mag Gam <firstname.lastname@example.org> wrote:
> > Is it possible to create a file on a random inode on a file
> Wouldn't it be easier (and safer) to create a large file, then
> seek within it?
> <snip sig stuff>
CentOS mailing list