Subj : Re: partition full - not really To : comp.os.linux.admin,comp.os.linux From : Rich Gibbs Date : Wed Jul 07 2004 05:20 pm Pol said the following, on 07/07/04 14:00: > Rich Gibbs wrote: > >> A file is only removed when the reference count goes to zero, which >> obviously will not happen as long as any process has the file open. >> > > i suspected something like this. Therefore I tried to edit that file to > delete content, but 'vi' took too long time to open the file so i gave up. > > Is there a way to cut down file content without opening? E.g. using 'sed' ? > There are the truncate(2) and ftruncate(2) system calls, but I don't know what the effect of these would be if another process has the file open, especially for writing. Trying to address whatever is causing the file to become so large is, I think, more likely to lead to a stable solution. -- Rich Gibbs rgibbs@alumni.princeton.edu .