filesystem_usage_delete_files
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
filesystem_usage_delete_files [2017/10/17 13:30] – luke7858 | filesystem_usage_delete_files [2024/05/23 07:26] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 7: | Line 7: | ||
\\ | \\ | ||
\\ | \\ | ||
- | 1) First we find the file descriptor for the offending file: | + | 1) First we find the file descriptor for the offending file. |
+ | \\ | ||
+ | NOTE: you may be spammed with a lot of files from /tmp/ or similar directorys. Find the appropriate file for your situation. | ||
<sxh bash> | <sxh bash> | ||
find /proc/*/fd -ls | grep ' | find /proc/*/fd -ls | grep ' | ||
</ | </ | ||
+ | Get the file descriptor from the deleted file, it will look similar to: | ||
+ | <sxh bash> | ||
+ | / | ||
+ | </ | ||
+ | Once you have this we can delete the file by emptying it. Replacing the following command with the $pid and $fd we got above: | ||
+ | \\ | ||
+ | <sxh bash> | ||
+ | > "/ | ||
+ | </ | ||
+ | Example: | ||
+ | <sxh bash> | ||
+ | > "/ | ||
+ | </ | ||
+ | \\ | ||
+ | \\ | ||
\\ | \\ | ||
+ | == JUST ECHO NOTHING INTO THE FILE == | ||
+ | Instead of deleting large files, simpy echo "" | ||
<sxh bash> | <sxh bash> | ||
- | lsof | grep ' | + | echo "" |
</ | </ |
filesystem_usage_delete_files.1508247036.txt.gz · Last modified: 2024/05/23 07:26 (external edit)