Dominic Ventimiglia asked 1 year ago
Title : How to clear disk space in linux without deleting a file that was consuming space?

Question :

How to clear disk space in linux without deleting a file that was consuming space?

1 Answers
Ruchin SinhaRuchin Sinha Staff answered 1 year ago

Hi,
If a certain file is consuming a lot of disk space and is being used by another process; deleting that file won’t free the disk space. Disk space won’t be cleared until that process ends or is killed.
In order to free the disk space consumed by a file that is currently being written by any process, below command can be used:
 
cat /dev/null > <file_name>
 
Thanks,
Ruchin

Cubastion is among a very small number of specialized Siebel CRM Oracle Gold Partners in SME.