Results 1 to 3 of 3
Hi,
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 ...
- 07-03-2007 #1Just Joined!
- Join Date
- May 2007
- Posts
- 5
Splitting of file?
Hi,
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???
- 07-03-2007 #2
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.
- 07-03-2007 #3Just Joined!
- Join Date
- May 2007
- Posts
- 5
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?


Reply With Quote
