如何查找挂载/分区目录或文件? (Linux服务器) [英] How to find out mount/partition a directory or file is on? (Linux Server)
本文介绍了如何查找挂载/分区目录或文件? (Linux服务器)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有一个Linux命令可以轻松找出哪个分区/挂载目录或文件?
Is there a Linux command to easily find out which partition/mount a directory or file is on?
(这可能是一个RTM问题,我感到内疚的问道,但不知何故,我找不到一个很好的答案谷歌只是..) / p>
(This is probably a RTM question, and I feel guilty for asking it, but somehow, I can't find a good answer on google just yet..)
推荐答案
df -P file/goes/here | tail -1 | cut -d' ' -f 1
这篇关于如何查找挂载/分区目录或文件? (Linux服务器)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文