Reputation
1,948
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
6 23
Impact
~189k people reached

Aug
28
comment understanding how filesystem type is determined before it is mounted
@Huang Tao With stat, you just get metainformation, not the actual file contents. file will call read to read part of the file. It depends on the kernel version and filesystem support, but file should recognize all common file systems. If the filesystems are experimental, your file magic database may predate their creation and signature definition. If the newest file cannot recognize it, it's probably an extremely experimental filesystem or random data.
Aug
28
comment understanding how filesystem type is determined before it is mounted
@Huang Tao Well, then I'm afraid you have to dig deeper and parse the MBR. Have you tried copying the partition minus the first 512 bytes?
Aug
28
awarded  Commentator
Aug
28
comment understanding how filesystem type is determined before it is mounted
@Huang Tao That's not a partition, but a disk. Specifying /dev/sdb1 (partition) instead of /dev/sdb (disk) should work.
Aug
28
comment understanding how filesystem type is determined before it is mounted
@Huang Tao Well, it works good enough to distinguish all the file systems supported by the kernel. Most good disk formats (file systems as well as files) include a precisely crafted header to make them differ from any other file type.
Aug
28
comment understanding how filesystem type is determined before it is mounted
@Huang Tao Sorry, I didn't read your question fully and therefore answered at the wrong level. Use the -s option (as in file -s /dev/sda1 ) to examine block devices.
Aug
28
revised understanding how filesystem type is determined before it is mounted
added 216 characters in body
Aug
28
answered understanding how filesystem type is determined before it is mounted
Aug
28
answered My Mac trying to connect to a possible intruder's machine, that is not in the network anymore
Aug
28
revised How to configure network on VM Ubuntu server with host changing networks?
edited body
Aug
28
comment How to configure network on VM Ubuntu server with host changing networks?
@Stewart Johnson Added detailed step-by-step guides. Are these explanations sufficient? The second variant (with a host-only network adapter) may be easier and will significantly especially Samba, but will add a virtual networking adapter to the host system.
Aug
28
revised How to configure network on VM Ubuntu server with host changing networks?
added 1099 characters in body
Aug
28
comment How to configure network on VM Ubuntu server with host changing networks?
@Stewart Johnson Yes, significantly. Added two paragraphs.
Aug
28
revised How to configure network on VM Ubuntu server with host changing networks?
added 704 characters in body
Aug
28
answered I think someone else has access to my wireless network. What next?
Aug
28
revised How to configure network on VM Ubuntu server with host changing networks?
added 1343 characters in body
Aug
28
revised How to configure network on VM Ubuntu server with host changing networks?
added 1343 characters in body
Aug
28
answered How to install linux to some physical computers efficiently
Aug
28
answered How to configure network on VM Ubuntu server with host changing networks?
Aug
28
answered Acer Aspire 5552 RF-kill in Linux = broken. No Wireless