how to find device number through shell script?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: how to find device number through shell script?
- From: "mayank sharma" <emailtomayanksharma@xxxxxxxxx>
- Date: Wed, 28 Feb 2007 15:23:59 +0530
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
[Index of Archives]
[Newbies FAQ]
[Linux Kernel Mentors]
[Linux Kernel Development]
[IETF Annouce]
[Git]
[Networking]
[Security]
[Bugtraq]
[Yosemite]
[MIPS Linux]
[ARM Linux]
[Linux RAID]
[Linux SCSI]
[Linux ACPI]