如何判断一个文件是否在Perl的远程文件系统上? [英] How can I tell if a file is on a remote filesystem with Perl?
本文介绍了如何判断一个文件是否在Perl的远程文件系统上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
stat -f -c%T< filename>
应该做你想做的事情。您可能还需要 -l </ code>
Is there a quick-and-dirty way to tell programmatically, in shell script or in Perl, whether a path is located on a remote filesystem (nfs or the like) or a local one? Or is the only way to do this to parse /etc/fstab and check the filesystem type?
解决方案
stat -f -c %T <filename>
should do what you want. You might also want -l
这篇关于如何判断一个文件是否在Perl的远程文件系统上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文