LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-14-2009, 09:27 PM   #1
vibinlakshman
Member
 
Registered: Dec 2008
Location: Kerala, India
Distribution: Ubuntu 11.10
Posts: 334

Rep: Reputation: 33
Wink 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 ???
 
Old 05-14-2009, 09:34 PM   #2
ozminh
Member
 
Registered: Aug 2007
Posts: 73

Rep: Reputation: 19
[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
 
Old 05-15-2009, 03:30 AM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287
You can also try 'blkid'.
 
Old 05-15-2009, 06:39 AM   #4
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 136Reputation: 136
Quote:
Originally Posted by vibinlakshman View Post
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 ?
 
Old 05-15-2009, 07:34 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by ozminh View Post
[minh@thanhminh ~]$ sudo /sbin/fdisk -l......
That gives you the partition type---not the filesystem.
 
Old 05-15-2009, 07:51 AM   #6
laurens
Member
 
Registered: Mar 2009
Posts: 65

Rep: Reputation: 15
I hope it's nothing like "press any key to continue"
"Huh, I can't find the 'any' key?!"
 
Old 05-15-2009, 08:03 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
You can also use "sudo file -s /dev/sda1". You can also use "file <imagefile>" for detecting the filesystem of a filesystem image file.
 
Old 05-15-2009, 08:21 AM   #8
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Jessie Amd64
Posts: 1,477

Rep: Reputation: Disabled
How about cat /etc/fstab.
 
Old 05-16-2009, 01:04 AM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Quote:
Originally Posted by the trooper View Post
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.
 
Old 05-16-2009, 08:38 AM   #10
cloud9repo
Member
 
Registered: Oct 2008
Location: Middle TN
Posts: 134

Rep: Reputation: 19
sudo lshw will give you the file systems in use.

It's list hardware, and it'll give size, extension, mounts, and file structure.
 
Old 05-17-2009, 11:06 AM   #11
cloud9repo
Member
 
Registered: Oct 2008
Location: Middle TN
Posts: 134

Rep: Reputation: 19
Quote:
Originally Posted by pixellany View Post
That gives you the partition type---not the filesystem.
what gives you partition type, guess.

you're stupid
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: The Linux Command Shell For Beginners: Fear Not The Command Line! LXer Syndicated Linux News 0 12-22-2008 06:30 PM
Turning a Ruby on Rails Ubuntu command into a Redhat command Mangalaiii Red Hat 1 12-02-2008 03:37 PM
Translating windows pscp command to linux scp command help robward Linux - General 2 01-17-2008 06:02 AM
startx command in FC7 reverts me back to the command prompt sriram87 Linux - Newbie 5 01-03-2008 11:18 PM
Require Linux/Perl equivalent command for windows Command alix123 Programming 7 08-19-2005 02:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration