Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Deleting large files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Deleting large files
Authored by: wheeles on Oct 19, '07 07:44:57AM
I'm not sure whether it will work in this case, but when I used to manage large UNIX-based systems, if I ever wished to free up space taken by a huge log file and free the space immediately, I would execute:
cp /dev/null full path of file to be deleted
This would set the file's size to 0 and then it could be deleted without having to wait for the system to deallocate the space used.

[ Reply to This | # ]
Deleting large files
Authored by: wheeles on Oct 19, '07 07:50:27AM

I just tried it on a 3.5GB file and it worked fine.



[ Reply to This | # ]
Deleting large files
Authored by: seika7 on Oct 19, '07 10:18:00AM

I deleted a 10.3 GB Entourage database without any problems on a MacBook Pro running 10.4.10.



[ Reply to This | # ]
Deleting large files
Authored by: seika7 on Oct 19, '07 10:19:46AM

BTW, that was using the Trash/Empty Trash, not the command line.



[ Reply to This | # ]
Deleting large files
Authored by: Fairly on Oct 20, '07 07:50:59PM

That makes no difference. Setting the file size to 0 effectively deallocates the space anyway. And nothing is ever overwritten unless you're trying to do a purge or an srm. They're totally equivalent.



[ Reply to This | # ]