Difference between revisions of "Rm (command)"
Jump to navigation
Jump to search
Line 14: | Line 14: | ||
== Related terms == | == Related terms == | ||
+ | * <code>[[truncate]]</code> | ||
* <code>[[lsof]] -a +L1 /path/to/fs</code> | * <code>[[lsof]] -a +L1 /path/to/fs</code> | ||
* Set file to zero: <code>[[truncate]] -s 0 /path/to/filename</code> | * Set file to zero: <code>[[truncate]] -s 0 /path/to/filename</code> |
Revision as of 13:42, 11 August 2020
This article is a Draft. Help us to complete it.
rm -rf
echo "" > /path/to/the/file.log
If it was already deleted, on Linux, you can still truncate it by doing: echo "" > "/proc/$pid/fd/$fd"
rm: cannot remove 'XXXX': Read-only file system
Related terms
truncate
lsof -a +L1 /path/to/fs
- Set file to zero:
truncate -s 0 /path/to/filename
unlink
echo
inode
mtime
scrub
See also
Advertising: