Date: Wed, 05 Mar 2008 11:07:28 +0100 From: Rick van der Zwet <rick@wirelessleiden.nl> To: freebsd-stable@freebsd.org Subject: Mapping stat(1) device number/name to partition? Message-ID: <47CE70E0.4000607@wirelessleiden.nl>
next in thread | raw e-mail | index | archive | help
Hi all, I am looking for a way to detect the file system a certain file lives and next whether this file system is mounted/accessible as writable. [1] As stat(1) is helping me out to found out the proper device name/number of a certain file with the command `stat -f "%d" /etc/motd`, but next will be the mapping from this device number (st_dev) to the proper partion/mount point. Which handy shell utility program will help me doing this? Or even better what are the proper search terms to find this answer, as mine attempts on the mailing archives, man pages and Google where not very successful Thanks a lot! /Rick [1] Part of getting rid of the annoying motd update failure message, when /etc is not writable. I know setting update_motd=NO in /etc/rc.conf will do the trick as well, but I would like to see him detecting it auto-magically ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47CE70E0.4000607>