I want to remove the first $rmv lines of a huge text file called $filename. This text file is so big that I cannot fit two copies of it on my hard drive. The following leaves me with a blank file called $filename:tail -n +$rmv $filename > $filename The following cannot execute because I do not have the storage space to fit both $filename and $filename.tmp:tail -n +$rmv $filename > $filename.tmp && mv $filename.tmp $filenameIf it matters, I'm using Mac OS X El Capitan.
Not enough disk space: remove first n lines of text file without copying the file
text processing;tail;storage;text formatting