Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么在这种情况下不起作用?
if [ -d /home/virt -a $(ls -A /home/virt/) = 0 ]
存在目录 /home/virt 并检查目录是否为 /home/virt/ 为空
谢谢...
if [ -d $1 -a $(ls -A $1 | wc -l) == 0 ]; then echo EMPTY fi