I'm trying to overwrite a file using:
cp source.txt target.txt
But I get "No space left on device".
I also tried using dd with no success, even with super user.
How can I overwrite using only the space used by the target file?
If you have it installed:
$ truncate -s 0 target.txt
Will reduce the file size to zero.
$ : > target.txt
But perhaps it is a problem with the journal being unable to write to disk. In that case, you need to log in as root to remove some files.