stat --format=%D <filename>
I hope there will be a stat/stat64 commands in solaries.
Cheers,
Ganesh
On 2/28/07, mayank sharma
<emailtomayanksharma@xxxxxxxxx> wrote:
I forgot to mention....particular on solaris--On 2/28/07, mayank sharma < emailtomayanksharma@xxxxxxxxx > wrote:Hello,
How can I find device number of a device through shell script. I know how could it be done in C
code snippet:
int main()
{
struct stat64 buf;
char *filepath = "/dev/dsk/c0t0d0s0";
if ( stat64(pszMountPoint, &buf) == 0 )
{
printf( "Device Number = %d", buf.st_dev);
}
return 0;
}
--
Regards,
Mayank Sharma
Regards,
Mayank Sharma
Software Engineer
Symantec,Pune