public inbox for speakup@linux-speakup.org
 help / color / mirror / Atom feed
* re: in place file splitter
@  Tyler Spivey
   ` Charles Hallenbeck
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Tyler Spivey @  UTC (permalink / raw)
  To: speakup

well, normally the split command does something like:
1. open the file for reading.
2. take one chunk, open a new output file, place it there and close it.
3. repeat until split.
this keeps the original file, and on a space limited system, e.g. a quota,
you're out of luck.
in place does:
1. open the file for reading.
2. read al the chunks into some kind of list.
3. wait to press enter, so the user can suspend the program and remove the
file.
4. write the output files.
if you remove the original file, the split files take up almost the same
space so quotas don't get in the way.
my program is no where complete, just a skeleton though.




^ permalink raw reply	[flat|nested] 12+ messages in thread
* re: in place file splitter
@  Tyler Spivey
   ` Adam Myrow
  0 siblings, 1 reply; 12+ messages in thread
From: Tyler Spivey @  UTC (permalink / raw)
  To: speakup

well, i guess you'd have to have enough memory to hold the whole file.
that doesn't matter though, since the worst that can happen is that the
kernel will kill any old process when the ram and swap fill up.
i've had no swap, and my ram got filled and it killed anything - it picks a
number at random and kills it.
not very useful, just extreamly annoying - it should kill the process that
is eating up all the ram.
but now that we can add huge ammounts of swap space, this isn't a big issue
anymore.
just dd to a file with input from /dev/zero, run swapon, and if the file
gets filled reboot so the swapspace
isn't used, and trash it.




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~ UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
 in place file splitter Tyler Spivey
 ` Charles Hallenbeck
   ` Igor Gueths
     ` Ralph W. Reid
       ` Igor Gueths
         ` Ralph W. Reid
 ` Janina Sajka
 ` Geoff Shang
   ` Igor Gueths
     ` Geoff Shang
 Tyler Spivey
 ` Adam Myrow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).