문제

Suppose I need to unmount all samba mounted remote file systems. I can do it as follows:

df -T | grep cifs | awk '{print "sudo umount", $7}' | sh

It works but looks a bit awkward. Using awk to create a command and pass it to sh for execution does not seem the right way to do things.

도움이 되었습니까?

해결책

I assume

sudo umount -a -t cifs

would do the same thing?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top