Difference between revisions of "Rm (command)"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
Tags: Mobile web edit, Mobile edit |
||
Line 1: | Line 1: | ||
− | |||
− | |||
[[wikipedia:rm (Unix)]] is used to remove different type objects such as computer [[files]], [[directories]] and [[symbolic links]] from file systems and also [[special files]] such as [[device nodes]], [[pipes]] and [[sockets]]. | [[wikipedia:rm (Unix)]] is used to remove different type objects such as computer [[files]], [[directories]] and [[symbolic links]] from file systems and also [[special files]] such as [[device nodes]], [[pipes]] and [[sockets]]. | ||
Revision as of 11:18, 27 August 2020
wikipedia:rm (Unix) is used to remove different type objects such as computer files, directories and symbolic links from file systems and also special files such as device nodes, pipes and sockets.
rm /path/to/your/file
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
touch
See also
Advertising: