Groups | Search | Server Info | Login | Register


Groups > comp.os.linux.misc > #933

Re: File real location

Date 2011-04-26 17:00 -0400
From JimR <NotReallyMyEmail@example.net>
Newsgroups comp.os.linux.misc
Subject Re: File real location
References <pkaj88-cg8.ln1@myleafnode.oneyv.org> <87pqo9apss.fsf@araminta.anjou.terraraq.org.uk> <mbgj88-84f.ln1@myleafnode.oneyv.org> <87tydkizhe.fsf@araminta.anjou.terraraq.org.uk>
Message-ID <mcoj88-jbd.ln1@myleafnode.oneyv.org> (permalink)
Organization Unlimited download news at news.astraweb.com

Show all headers | View raw


On 04/26/2011 03:28 PM, Richard Kettlewell wrote:
> JimR<NotReallyMyEmail@example.net>  writes:
>> Richard Kettlewell wrote:
>
>>> stat() it and look at st_dev.
>>
>> OK, did stat with and without -f.  Got the results below.  The device
>> ID is different in each case.  How do I relate that number back to the
>> filesystem?
>
> You can find it in the 'ls -l' output for the physical device underlying
> the filesystem.  For instance, 806h corresponds to 8, 6 (probably sda6);
> in the example below fe00h = fe, 00 = 254, 0.
>
>    richard@araminta:~/src/rsbackup$ stat /etc/motd | grep Device
>    Device: fe00h/65024d	Inode: 301455      Links: 1
>    richard@araminta:~/src/rsbackup$ mount | grep 'on / '
>    /dev/mapper/araminta-root on / type ext3 (rw,noatime,errors=remount-ro)
>    richard@araminta:~/src/rsbackup$ ls -lL /dev/mapper/araminta-root
>    brw-rw---- 1 root disk 254, 0 Apr  4 18:57 /dev/mapper/araminta-root
>

Perfect, thanks for your help.

JimR

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

File real location JimR <NotReallyMyEmail@example.net> - 2011-04-26 13:06 -0400
  Re: File real location Richard Kettlewell <rjk@greenend.org.uk> - 2011-04-26 18:24 +0100
    Re: File real location The Natural Philosopher <tnp@invalid.invalid> - 2011-04-26 18:28 +0100
      Re: File real location notbob <notbob@notbob.invalid> - 2011-04-26 18:08 +0000
        Re: File real location Richard Kettlewell <rjk@greenend.org.uk> - 2011-04-26 19:14 +0100
        Re: File real location Tim Watts <tw@dionic.net> - 2011-04-26 19:25 +0100
        Re: File real location unruh <unruh@wormhole.physics.ubc.ca> - 2011-04-26 18:43 +0000
        Re: File real location Chris Davies <chris-usenet@roaima.co.uk> - 2011-04-27 16:31 +0100
    Re: File real location Tim Watts <tw@dionic.net> - 2011-04-26 19:08 +0100
    Re: File real location JimR <NotReallyMyEmail@example.net> - 2011-04-26 14:43 -0400
      Re: File real location Richard Kettlewell <rjk@greenend.org.uk> - 2011-04-26 20:28 +0100
        Re: File real location JimR <NotReallyMyEmail@example.net> - 2011-04-26 17:00 -0400
  Re: File real location The Natural Philosopher <tnp@invalid.invalid> - 2011-04-26 18:27 +0100
  Re: File real location "Chris F.A. Johnson" <cfajohnson@gmail.com> - 2011-04-26 13:44 -0400
  Re: File real location unruh <unruh@wormhole.physics.ubc.ca> - 2011-04-26 17:52 +0000

csiph-web