3 ms·
I've had my disks so full that a `rm` command doesn't even work, would this workaround work in those cases too?
by capableweb 6y ago
I've had my disks so full that a `rm` command doesn't even work, would this workaround work in those cases too?
- geocrasher 6y agoYes because you could just do > save_my_butt.img and now it's 0 bytes.
- kiwijamo 6y agoWould that work? The fs may actually allocate a new file before deleting the exisiting allocation so the risk of it not working is still there I would think?
- quesera 6y agoIt might vary by kernel, filesystem, or shell, but in my experience and confirmed with a quick test: shell redirection does not create a new file/inode.
- geocrasher 6y agoWorst case scenario, if > filename didn't null it, then just echo "0" > filename