Question: > 
> **Possible Duplicate:**  
> 
> [Checking if a directory contains files](https://stackoverflow.com/questions/91368/checking-if-a-directory-contains-files) 
> 
> 
> 

I want to see if a directory is empty, so I am using `[` as follows:

```
[ -f "./ini/*"]

```

And the return value is always 1, even though the directory is not empty.
Any ideas what's wrong?

Answer: 
```
if find ./ini/ -maxdepth 0 -empty | read;
then
echo "Not Empty"
else
echo "Empty"
fi

```
This works for me 

```
[ "$(ls -A /path/to/directory)" ]

```

in your case it would be

```
[ "$(ls -A ./ini/)" ]

```

you can test it using 

```
[ "$(ls -A /tmp)" ] && echo "Not Empty" || echo "Empty"

```