Is there a Linux command to easily find out which partition/mount a directory or file is on?
(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..)
Is there a Linux command to easily find out which partition/mount a directory or file is on?
(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
df -P /home | tail -1 | awk '{ print $1}'
–
Lorraine df -P /var/www/html | tail -1 | cut -d' ' -f 1
–
Indicator © 2022 - 2024 — McMap. All rights reserved.