I am trying to release space in my server's hd so I'm matching old dates in a log file with sed and it is decreasing but my root partition is now using 98% percent of it's space instead of 91% it was using before I invoke sed.
I did this sed -i '/^Jan/ d' file.log and my log file decrease from 6G to 400M.
I'm using find / -size +1G trying to search a temporal file or something like that but it's not matching new files.
Edit: I did echo -n > file.log to avoid a service crash but it's temporal because the issue remains
|
|
||||
|
The
which means prior to the It sounds like the larger problem is that you are just plain out of disk-space or you have /var/log and /tmp mounted on the same partition as / and if / is on a small partition, you will overfill it now and next week and the week after that, etc. Look at
|
|||||||
|
|
Running strace on the sed -i should make it pretty obvious where it's putting the temporary files. But the easiest thing to do is not use -i. Redirect the output to a file on a partition where you have space. |
|||
|
sed -iis non-standard so if in-place file modification is desired,ed(1)is recommended oversed -iinstead. – jw013 Feb 10 '12 at 1:38