Pretty much you should just look at a directory as any other file....its contents just happen to point to another i-node in the system. As such, you can use all of the general file existential operators on a directory or file interchangeably. -d -r -x and all the rest.