LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-11-2009, 07:10 AM   #1
EmrldDrgn
Member
 
Registered: Oct 2008
Posts: 40

Rep: Reputation: 16
Check file system type of a partition


I'm trying to check the type of file system (ntfs, ext2, xfs, etc.) on a partition. I cannot guarantee that the partition will be mounted when I do this. fdisk -l on the disk gets me closest of the options I have found, but it only says "Linux" for ext3, "Linux/Solaris" for swap, and various other non-specific descriptions. How can I do this?

Thanks
 
Old 07-11-2009, 07:11 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
try
mount
 
Old 07-11-2009, 07:20 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
For unmounted linux partitions you can try
Code:
file -s <device name>
where the device name is /dev/sda1, /dev/sda2, /dev/hda1 and so on. You can determine the actual device from the output of fdisk.

For mounted partitions you can use
Code:
df -T
or the mount command without arguments, as suggested by repo above.
 
Old 07-11-2009, 08:56 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,542
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

'parted' is another great utility that can be used to identify or work with partitions.
 
  


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
An error Occurred during the file system check. Dropping you to shell; the system wil aneikei Linux - Newbie 3 02-11-2010 08:38 PM
PCLOS: Boot error: file system type is ext2fs; partition is 0x83, and error 13 dpeirce Linux - Distributions 3 09-29-2008 11:48 PM
file system type ust Linux - Software 5 04-08-2008 04:09 PM
How to know partition file system type? Hondro Slackware 4 11-28-2006 04:28 AM
help! system halts while partition check during startup xak Linux - Hardware 3 08-28-2003 10:35 PM


All times are GMT -5. The time now is 10:31 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