How to delete a large file on LINUX server? (Load higher than 1.0 forces system into Read-only)

1.1k views Asked by At

I have created a java application which runs on a LINUX server and prints information to a log file.

The application was running fine, however the log file grew quicker than I expected and over a few days it took up all the available space on the server.

The java application is now stopped and I want to remove the excessive log file (11,264 MiB) to free up memory in order to start the process again.

When I log into the server I get the following message:

System information disabled due to load higher than 1.0

When I navigate via the command line to the file and try to remove it, I get the following:

$rm nohup.out
rm: cannot remove 'nohup.out': Read-only file system

I believe since the load is higher than 1.0 the system is forced into 'Read-only' mode. Does anybody have an idea how I could delete the file?

Does anybody have any suggestions? I read something about perhaps using fsck, is this a viable option? If so, how would I use fsck?

1

There are 1 answers

2
Havoc P On

Can you remount the filesystem read-write?

https://askubuntu.com/questions/175739/how-do-i-remount-a-filesystem-as-read-write has the command line for that.