Recent

Author Topic: [SOLVED] Linux: how to detect if an USB-drive has NTFS or FAT file system?  (Read 6827 times)

Hartmut

  • Hero Member
  • *****
  • Posts: 749
Re: [SOLVED] Linux: how to detect if an USB-drive has NTFS or FAT file system?
« Reply #15 on: February 20, 2020, 05:18:51 pm »
Hmm. When I use "lsblk -f ..." instead of "lsblk -fs ..." then I also get no filesystems info. Why did you change "-fs" into "-f" ?

Alternatively I could use "lsblk --fs -p -r -o NAME,FSTYPE,MOUNTPOINT". Both variants show me (some lines deleted):
Code: Bash  [Select][+][-]
  1. NAME FSTYPE MOUNTPOINT
  2. /dev/sda1 ntfs
  3. /dev/sda2 vfat /media/D
  4. /dev/sda9 vfat /media/X
  5. /dev/sdd1 ntfs /media/hg6/Verbatim_HD

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: [SOLVED] Linux: how to detect if an USB-drive has NTFS or FAT file system?
« Reply #16 on: February 20, 2020, 06:36:22 pm »
Hmm. When I use "lsblk -f ..." instead of "lsblk -fs ..." then I also get no filesystems info. Why did you change "-fs" into "-f" ?

Because my lsblk didn't like the single dash "-fs" ;)

Quote
Alternatively I could use "lsblk --fs -p -r -o NAME,FSTYPE,MOUNTPOINT". Both variants show me (some lines deleted):
Code: Bash  [Select][+][-]
  1.  ...

Yes, my more modern boxes (xxbuntu 16 plus) show that info too but this one (with 12.04) doesn't. Quite logical: it's quite old (both the machine and the OS version).
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: [SOLVED] Linux: how to detect if an USB-drive has NTFS or FAT file system?
« Reply #17 on: February 20, 2020, 07:39:27 pm »
Hi!

Suse  Tumbleweed shows this

Code: Text  [Select][+][-]
  1. NAME FSTYPE MOUNTPOINT
  2. /dev/sda  
  3. /dev/sda1  
  4. /dev/sda2 ext4 /
  5. /dev/sda3 swap [SWAP]
  6. /dev/sdb  
  7. /dev/sdb1 ntfs /Windows
  8. /dev/sdb2 ntfs /Data
  9. /dev/sdb3 ntfs /MMedia
  10. /dev/sdc  
  11. /dev/sdc1 ext4
  12. /dev/sr0 iso9660
  13.  

Everything is fine.
Works also with -f or -fs

It is :
lsblk --version
lsblk from util-linux 2.34


Winni
« Last Edit: February 20, 2020, 07:42:11 pm by winni »

 

TinyPortal © 2005-2018