I have a log file on server called `writelog` which is about `2GB`.

I want to delete first `100,000` lines from the file. I could open the file and delete those lines but because of the file size it takes me forever to download it.

So, is it possible to do this from Linux terminal? If yes how?
['https://Stackoverflow.com/questions/12302290', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1143828/']
If you want to clear out the *whole file* a quick way is   

`cat /dev/null > writelog`

See also [this thread on unix.com](http://www.unix.com/unix-dummies-questions-answers/150082-create-empty-file-overwrite-file-differences-between-cat-echo-etc.html).
It might be better to keep the last 1000 lines:

```
mv writelog writelog.bak
tail -1000 writelog.bak > writelog

```

And you should enable `logrotate` ([manual](http://linux.die.net/man/8/logrotate)) for the file. The system will then make sure the file doesn't grow out of proportions.