Splitting of file?
I want to split a file which has a size of 4.5Gb . But the problem is I have 2 Gb of space remaining. split command keeps the original file also. So thats out of question. If i try to open the file in vi it gives me some write error. So copying from vi is also not an option. So is there a way to copy specific no. of lines and delete specific no. of lines???
U CAN TRY VIA TAIL COMMAND.
like for last 300 lines
#tail -300 filename > newfile
else can explore more of tail (-c for size in bytes)
redirect output to new file and delete the original one.
I know about use of tail -n and to redirect specific no. of lines to file.
But the problem still remains how to delete those lines which are copied without using vi?