ls | wc -l in other directory code example Example: ls | wc -l in other directory cd "your path" && ls | wc -l