Article 5DVT3 Checking multiple directories if they are empty. or if they have files inside.

Checking multiple directories if they are empty. or if they have files inside.

by
//////
from LinuxQuestions.org on (#5DVT3)
hello all.

what would be easiest way to check directories if they are empty or if they have file's inside?

Code:[root@arch /var]# ls /var/log/suricata/filestore
00 0a 14 1e 28 32 3c 46 50 5a 64 6e 78 82 8c 96 a0 aa b4 be c8 d2 dc e6 f0 fa
01 0b 15 1f 29 33 3d 47 51 5b 65 6f 79 83 8d 97 a1 ab b5 bf c9 d3 dd e7 f1 fb
02 0c 16 20 2a 34 3e 48 52 5c 66 70 7a 84 8e 98 a2 ac b6 c0 ca d4 de e8 f2 fc
03 0d 17 21 2b 35 3f 49 53 5d 67 71 7b 85 8f 99 a3 ad b7 c1 cb d5 df e9 f3 fd
04 0e 18 22 2c 36 40 4a 54 5e 68 72 7c 86 90 9a a4 ae b8 c2 cc d6 e0 ea f4 fe
05 0f 19 23 2d 37 41 4b 55 5f 69 73 7d 87 91 9b a5 af b9 c3 cd d7 e1 eb f5 ff
06 10 1a 24 2e 38 42 4c 56 60 6a 74 7e 88 92 9c a6 b0 ba c4 ce d8 e2 ec f6 tmp
07 11 1b 25 2f 39 43 4d 57 61 6b 75 7f 89 93 9d a7 b1 bb c5 cf d9 e3 ed f7
08 12 1c 26 30 3a 44 4e 58 62 6c 76 80 8a 94 9e a8 b2 bc c6 d0 da e4 ee f8
09 13 1d 27 31 3b 45 4f 59 63 6d 77 81 8b 95 9f a9 b3 bd c7 d1 db e5 ef f9those directories might have files on em. any pointers to right direction are welcomed.latest?d=yIl2AUoC8zA latest?i=ET8g-UQAboo:CWEvU80bZzo:F7zBnMy latest?i=ET8g-UQAboo:CWEvU80bZzo:V_sGLiP latest?d=qj6IDK7rITs latest?i=ET8g-UQAboo:CWEvU80bZzo:gIN9vFwET8g-UQAboo
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments