Skip to main content
added 282 characters in body
Source Link
User051209
  • 690
  • 2
  • 8
  • 26

EDITEDIT[1]
I add the output of the file -s command for a exfat partition and for an ext4 partition.

In these 4 examples (FAT32, NTFS, EXFAT, EXT4) the output of the file command appears very different for different filesystem types, so it is difficult to find a simple rule to decide the filesystem type by this output.


EDIT[2]
To clarify why I'm trying to use the file command to get information about the filesystem type of a USB, please read this post.

EDIT
I add the output of the file -s command for a exfat partition and for an ext4 partition.

In these 4 examples (FAT32, NTFS, EXFAT, EXT4) the output of the file command appears very different for different filesystem types, so it is difficult to find a simple rule to decide the filesystem type by this output.

EDIT[1]
I add the output of the file -s command for a exfat partition and for an ext4 partition.

In these 4 examples (FAT32, NTFS, EXFAT, EXT4) the output of the file command appears very different for different filesystem types, so it is difficult to find a simple rule to decide the filesystem type by this output.


EDIT[2]
To clarify why I'm trying to use the file command to get information about the filesystem type of a USB, please read this post.

added 71 characters in body; edited tags
Source Link
User051209
  • 690
  • 2
  • 8
  • 26

My problem is to readdecode the output of the command file -s /dev/sdX on my system (where /dev/sdX is the device file associated to a USB key). Below
Below I'll show the output of the command file -s /dev/sdX where the device file /dev/sda1 is a partition formatted with a FAT32 filesystem, while the device /dev/sdb is a partition formatted with a NTFS filesystem.

In the output is present the information , FAT (32 bit), sectors/FAT 1920, which could be enaughenough to say that the filesystem type is FAT32, but in the next paragraph I'll show that the string FAT is also present in the output of the file command in the case of an NTFS filesystem.

In the case of thea NTFS filesystem the output of the file command is:

My problem is to read the output of the command file -s /dev/sdX on my system. Below I'll show the output of the command file -s /dev/sdX where the device file /dev/sda1 is a partition formatted with a FAT32 filesystem, while the device /dev/sdb is a partition formatted with a NTFS filesystem.

In the output is present the information , FAT (32 bit), sectors/FAT 1920, which could be enaugh to say that the filesystem type is FAT32, but in the next paragraph I'll show that the string FAT is also present in the output of file command in the case of an NTFS filesystem.

In the case of the NTFS filesystem the output of the file command is:

My problem is to decode the output of the command file -s /dev/sdX on my system (where /dev/sdX is the device file associated to a USB key).
Below I'll show the output of the command file -s /dev/sdX where the device file /dev/sda1 is a partition formatted with a FAT32 filesystem, while the device /dev/sdb is a partition formatted with a NTFS filesystem.

In the output is present the information , FAT (32 bit), sectors/FAT 1920, which could be enough to say that the filesystem type is FAT32, but in the next paragraph I'll show that the string FAT is also present in the output of the file command in the case of an NTFS filesystem.

In the case of a NTFS filesystem the output of the file command is:

Became Hot Network Question
edited body
Source Link
User051209
  • 690
  • 2
  • 8
  • 26

My problem is to read the output of the command file -s /dev/sdX on my system. Below I'll show the output of the command file -s /dev/sdX where the device file /dev/sda1 is a partition formatted with a FAT32 filesystem, while the device /dev/sdasdb is a partition formatted with a NTFS filesystem.

> file -s /dev/sdasdb 
/dev/sdasdb: DOS/MBR boot sector, code offset 0x52+2, OEM-ID "NTFS    ", sectors/cluster 8, Media descriptor 0xf8, sectors/track 63, heads 255, dos < 4.0 BootSector (0x0), FAT (1Y bit by descriptor); NTFS, sectors/track 63, physical drive 0x80, sectors 15654911, $MFT start cluster 786432, $MFTMirror start cluster 2, bytes/RecordSegment 2^(-1*246), clusters/index block 1, serial number 030fcd5a9fcd56a1c; contains bootstrap BOOTMGR

My problem is to read the output of the command file -s /dev/sdX on my system. Below I'll show the output of the command file -s /dev/sdX where the device file /dev/sda1 is a partition formatted with a FAT32 filesystem, while the device /dev/sda is a partition formatted with a NTFS filesystem.

> file -s /dev/sda 
/dev/sda: DOS/MBR boot sector, code offset 0x52+2, OEM-ID "NTFS    ", sectors/cluster 8, Media descriptor 0xf8, sectors/track 63, heads 255, dos < 4.0 BootSector (0x0), FAT (1Y bit by descriptor); NTFS, sectors/track 63, physical drive 0x80, sectors 15654911, $MFT start cluster 786432, $MFTMirror start cluster 2, bytes/RecordSegment 2^(-1*246), clusters/index block 1, serial number 030fcd5a9fcd56a1c; contains bootstrap BOOTMGR

My problem is to read the output of the command file -s /dev/sdX on my system. Below I'll show the output of the command file -s /dev/sdX where the device file /dev/sda1 is a partition formatted with a FAT32 filesystem, while the device /dev/sdb is a partition formatted with a NTFS filesystem.

> file -s /dev/sdb 
/dev/sdb: DOS/MBR boot sector, code offset 0x52+2, OEM-ID "NTFS    ", sectors/cluster 8, Media descriptor 0xf8, sectors/track 63, heads 255, dos < 4.0 BootSector (0x0), FAT (1Y bit by descriptor); NTFS, sectors/track 63, physical drive 0x80, sectors 15654911, $MFT start cluster 786432, $MFTMirror start cluster 2, bytes/RecordSegment 2^(-1*246), clusters/index block 1, serial number 030fcd5a9fcd56a1c; contains bootstrap BOOTMGR
added 778 characters in body
Source Link
User051209
  • 690
  • 2
  • 8
  • 26
Loading
Source Link
User051209
  • 690
  • 2
  • 8
  • 26
Loading