LinuxQuestions.org
Review your favorite Linux distribution.
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 10-13-2008, 08:12 AM   #1
Bill Shankley
LQ Newbie
 
Registered: Jul 2008
Posts: 4

Rep: Reputation: 0
disk formats, getting the information and potentially changing it


Hi,

Say i plug a usb disk in and want to see what format it is i.e. FAT32, NTFS etc how would i do that?

I've used sfdisk which is useful for onboard hard drives but what about usb sticks and usb hard drives?

Also how would i then go on to change the format from one to the other.

Newbie question i know but that's exactly what i am.

Thanks, Bill
 
Old 10-13-2008, 08:48 AM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
fdisk -l should list them all.

To change the format you need to reformat, except for a few concrete cases. For example, you can mount a ext3 drive as ext2, and vice-versa. You can also mount ext3 as ext4, but if you have any ext4-only feature enabled then you can't mount it back as ext3 anymore once you write to it.

But, as said, the general rule is that to change from one format to another, you need to reformat.
 
Old 10-13-2008, 08:58 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,838

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Quote:
Originally Posted by i92guboj View Post
fdisk -l should list them all.
That will only list what type the partition was created with. Not necessarily the same as what the filesystem is created as.
I prefer to use "file -s /dev/<partition>"

Check "man mkfs" for making a filesystem (i.e. reformat a partition).
 
Old 10-13-2008, 10:52 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
You can also use the udevinfo command. It will tell you the filesystem, label, uuid and other information.

example:
udev -q env -n /dev/sdd1

You can run udevinfo as a normal user.
 
Old 10-13-2008, 11:25 AM   #5
Bill Shankley
LQ Newbie
 
Registered: Jul 2008
Posts: 4

Original Poster
Rep: Reputation: 0
thanks syg00, that's exactly what i was looking for, mkfs was bang on too.

Reformatting a drive to get a different format kind of speaks for itself really, i know what i want to do just not always how to do it!

Thanks for all your help.

Bill
 
Old 10-13-2008, 06:02 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,838

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
You might find "apropos" useful - "man apropos" (even "man man" might be a good place to start).
To some extent you need to know what you're looking for - try "apropos filesystem" for example.
 
  


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
recovering a potentially fried hard disk? zero79 Linux - Hardware 6 08-08-2006 02:35 AM
changing the file formats raja General 4 06-23-2006 03:26 PM
Linus (SuSE) and disk formats teagan Linux - Newbie 2 09-10-2005 01:17 PM
changing uname information helios the sun Linux - Newbie 2 08-10-2004 12:15 PM
changing finger information in solaris sandy Linux - Distributions 0 09-13-2002 04:03 AM


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