stat test.log
File: `test.log\'
Size: 573 Blocks: 8 IO Block: 4096 regular file
Device: 804h/2052d Inode: 7091301 Links: 1
Access: (06
The stat command is simply a frontend to the stat() system call.
From the stat(2) manual page (man 2 stat)
The st_dev field describes the device on which this file resides. (The major(3) and minor(3) macros may be useful to decompose the device ID in this field.)
From the 0804 hex notation you get major=8 (/dev/sd*) minor=4. i.e. /dev/sda4