Re: How to remove a single line from a flat file
- From: Atte Kojo <atte.kojo@xxxxxxxxx>
- Date: 17 May 2007 22:52:14 -0700
On 17 touko, 18:30, Darren New <d...@xxxxxxxxxx> wrote:
I think we're starting to get to where the want-to needs is starting to
run into the able-to power of the machines again. Systems had mechanisms
back then for (say) seeking to meaningfully-identifiable places in a
file, adding/deleting/modifying records in the middle, and so on,
because you couldn't afford to duplicate a multi-megabyte file just
because you added something in the middle. Nowadays we're getting files
too large to reasonably fit on one disk, and we have no way of editing
them. Reinventing the wheel here.
If UNIX had just a couple more operations, like "insert some bytes" and
"delete some bytes", which would be pretty easy to add[1] by simply
keeping a "bytes used in this block" kind of counter for each block, you
could eliminate a whole class of problems.
I think that UNIX filesystem are simple (primitive if you want)
because UNIX itself is simple (primitive). It's just like keeping all
configuration information in ASCII files (or using ex ;-).
The system provides a very simple filesystem and it's up to the
programmer to implement a more advanced (complicated) mechanism on top
of it in the rare cases it's needed. Take syslog for example; file
access is serialized by using a global daemon that that is the only
process writing to the log files. Really simple and elegant if you ask
me :). If you want something more complicated than that, then you
should be using a databas which has its own methods for locking,
caching and stuff.
It would take a lot of legwork to convince me to use a filesystem with
almost database-like functionality just because a few programs might
need the features ;-)
.
- Follow-Ups:
- Re: How to remove a single line from a flat file
- From: Darren New
- Re: How to remove a single line from a flat file
- References:
- How to remove a single line from a flat file
- From: Swaroop
- Re: How to remove a single line from a flat file
- From: Larry W. Virden
- Re: How to remove a single line from a flat file
- From: suchenwi
- Re: How to remove a single line from a flat file
- From: Larry W. Virden
- Re: How to remove a single line from a flat file
- From: slebetman@xxxxxxxxx
- Re: How to remove a single line from a flat file
- From: Larry W. Virden
- Re: How to remove a single line from a flat file
- From: Atte Kojo
- Re: How to remove a single line from a flat file
- From: Larry W. Virden
- Re: How to remove a single line from a flat file
- From: Darren New
- Re: How to remove a single line from a flat file
- From: billposer
- Re: How to remove a single line from a flat file
- From: Donal K. Fellows
- Re: How to remove a single line from a flat file
- From: Darren New
- How to remove a single line from a flat file
- Prev by Date: Re: How to remove a single line from a flat file
- Next by Date: Re: SSH to remote system, su to root, then execute cmds from external file
- Previous by thread: Re: How to remove a single line from a flat file (Now very OT)
- Next by thread: Re: How to remove a single line from a flat file
- Index(es):
Relevant Pages
|
|