This shows you the differences between the selected revision and the current version of the page.
technology:unix:useful_commands 08.08.2011 10:42 | technology:unix:useful_commands 03.18.2013 05:53 current | ||
---|---|---|---|
Line 14: | Line 14: | ||
locate Data.fs | xargs ls -l ; xargs to pipe results of one command to another | locate Data.fs | xargs ls -l ; xargs to pipe results of one command to another | ||
find ./ -name '*py' | xargs grep signal ; Find string "signal" inside text of .py files; xargs looks inside the files instead of at the file name | find ./ -name '*py' | xargs grep signal ; Find string "signal" inside text of .py files; xargs looks inside the files instead of at the file name | ||
+ | grep -ir "timeout" . ; find the string "timeout" in any file below the current dir | ||
= Various = | = Various = | ||
Line 55: | Line 56: | ||
ps -A -o pid,state,command | grep D ; find process that's blocking due to IO wait | ps -A -o pid,state,command | grep D ; find process that's blocking due to IO wait | ||
; 'D' is for Delayed processes, IO wait is most common cause | ; 'D' is for Delayed processes, IO wait is most common cause | ||
- | grep -ir "timeout" . ; find the string "timeout" in any file below the current dir | ||
Line 62: | Line 62: | ||
lsof /media/documents/ ; show list of files open | lsof /media/documents/ ; show list of files open | ||
lsof / | grep media ; in case above doesnt work, lsof seems to work better on root and then grep it out for what you need | lsof / | grep media ; in case above doesnt work, lsof seems to work better on root and then grep it out for what you need | ||
+ | lsof +D /var/log/ ; list of files open under the given directory (recursive) (use +d for non-recurse) | ||