LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Is there Any command ? (https://www.linuxquestions.org/questions/linux-newbie-8/is-there-any-command-726109/)

vibinlakshman 05-14-2009 09:27 PM

Is there Any command ?
 
When i provide partition or in Linux if i give something like /dev/sda2 , is there any way to knw the filesystem its using

I mean any command or so , to determine which filesystem is this particular partition using ???

ozminh 05-14-2009 09:34 PM

[minh@thanhminh ~]$ sudo /sbin/fdisk -l

Disk /dev/hda: 40.0 GB, 40020664320 bytes
240 heads, 63 sectors/track, 5169 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 14 105808+ 83 Linux
/dev/hda2 15 82 514080 82 Linux swap
/dev/hda3 * 83 624 4097520 b W95 FAT32
/dev/hda4 625 5169 34360200 f W95 Ext'd (LBA)
/dev/hda5 625 1436 6138657 83 Linux
/dev/hda6 1437 5169 28221448+ 83 Linux

Disk /dev/hdd: 40.0 GB, 40020664320 bytes
240 heads, 63 sectors/track, 5169 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

Device Boot Start End Blocks Id System
/dev/hdd1 * 1 5169 39077608+ 83 Linux

H_TeXMeX_H 05-15-2009 03:30 AM

You can also try 'blkid'.

Valery Reznic 05-15-2009 06:39 AM

Quote:

Originally Posted by vibinlakshman (Post 3541281)
When i provide partition or in Linux if i give something like /dev/sda2 , is there any way to knw the filesystem its using

I mean any command or so , to determine which filesystem is this particular partition using ???

mount ?

pixellany 05-15-2009 07:34 AM

Quote:

Originally Posted by ozminh (Post 3541287)
[minh@thanhminh ~]$ sudo /sbin/fdisk -l......

That gives you the partition type---not the filesystem.

laurens 05-15-2009 07:51 AM

I hope it's nothing like "press any key to continue"
"Huh, I can't find the 'any' key?!" ;)

jschiwal 05-15-2009 08:03 AM

You can also use "sudo file -s /dev/sda1". You can also use "file <imagefile>" for detecting the filesystem of a filesystem image file.

the trooper 05-15-2009 08:21 AM

How about cat /etc/fstab.

jschiwal 05-16-2009 01:04 AM

Quote:

Originally Posted by the trooper (Post 3541773)
How about cat /etc/fstab.

Yes, if fstab contains the information. If you have a new partition, or the
information in fstab is incorrect, and so it won't mount, you still have some tools that can help.

cloud9repo 05-16-2009 08:38 AM

sudo lshw will give you the file systems in use.

It's list hardware, and it'll give size, extension, mounts, and file structure.

cloud9repo 05-17-2009 11:06 AM

Quote:

Originally Posted by pixellany (Post 3541732)
That gives you the partition type---not the filesystem.

what gives you partition type, guess.

you're stupid


All times are GMT -5. The time now is 06:56 AM.