简体   繁体   English

卸载所有samba文件系统

[英]Unmount all samba file systems

Suppose I need to unmount all samba mounted remote file systems. 假设我需要卸载所有samba挂载的远程文件系统。 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. 使用awk创建命令并将其传递给sh以便执行似乎不是正确的方法。

I assume 我假设

sudo umount -a -t cifs

would do the same thing? 会做同样的事情吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM