To delete all contentĀ from current position to the end of file on bash, you can take the following steps:
- Open file in vi or vim
$> vi fiele $> # or $> vim file
- Switch to visual blockĀ mode
Ctrl+v
- Press G (Shift+g)
- Mark text to delete with arrow keys top and down or just press END to mark everything to the end of file
- Press DĀ (Shift+d) to delete selected lines