stat test.log
File: `test.log\'
Size: 573 Blocks: 8 IO Block: 4096 regular file
Device: 804h/2052d Inode: 7091301 Links: 1
Access: (06
# stat tool
File: `tool'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 801h/2049d Inode: 671689 Links: 3
# ls -l /dev/sda*
brw-rw---- 1 root disk 8, 0 2010-08-16 14:43 /dev/sda
brw-rw---- 1 root disk 8, 1 2010-08-16 14:43 /dev/sda1
brw-rw---- 1 root disk 8, 2 2010-08-16 14:43 /dev/sda2
brw-rw---- 1 root disk 8, 5 2010-08-16 14:43 /dev/sda5
In the example, 'tool'(801h) is in /dev/sda1(major device number is 8, minor device number is 1), that's first partition in /dev/sda.