Timeline for How to exclude the folders proc and sys from search with find command ?
Current License: CC BY-SA 4.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| S Feb 7, 2020 at 9:42 | history | suggested | Ivan Kaloyanov | CC BY-SA 4.0 |
Added information to the answer
|
| Feb 7, 2020 at 8:32 | review | Suggested edits | |||
| S Feb 7, 2020 at 9:42 | |||||
| Jun 30, 2018 at 14:04 | comment | added | BrainStone |
Couldn't you just do find / \( -path /sys -o -path /proc \) -prune -o -type d Would be useful if you want to exclude more dirs like /dev or /tmp, etc.
|
|
| Mar 29, 2015 at 23:51 | vote | accept | Abdul Al Hazred | ||
| Mar 29, 2015 at 23:42 | comment | added | terdon♦ |
@AbdulAlHazred you haven't said what messages but I'm guessing they're "permission denied" errors. Either run the command as root or just ignore the errors by sending them to stderr: find / -xdev -type d 2>/dev/null.
|
|
| Mar 29, 2015 at 23:32 | comment | added | Abdul Al Hazred | great, short and insightful. find / -xdev -type d itself works, but find / -xdev -type d | shuf -n 1 displays error messages. | |
| Mar 29, 2015 at 23:24 | history | answered | Gilles 'SO- stop being evil' | CC BY-SA 3.0 |