LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-18-2009, 02:32 PM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
Question Label a Drive During the Format Command


I use to know this command but lost it and did not note the entire command on my Linux cheat sheet. Someone once showed me a simple very easy command I could use to simple format a USB flash drive as FAT32 and in the same command also name the label of the drive.

I have the device /dev/sdc1 and I am formatting this as FAT32 so it's compatible across multiple systems but also want the drive to have the name 'my_usb'. Anyone know how this is possible?
 
Old 12-18-2009, 02:48 PM   #2
raju.mopidevi
Senior Member
 
Registered: Jan 2009
Location: vijayawada, India
Distribution: openSUSE 11.2, Ubuntu 9.0.4
Posts: 1,155
Blog Entries: 12

Rep: Reputation: 92
Code:
#mkfs.fat32 -v -L usbdisk /dev/sdb1
 
Old 12-18-2009, 03:08 PM   #3
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 77
I have msdos and vfat. Is there a difference?
 
Old 12-18-2009, 03:17 PM   #4
raju.mopidevi
Senior Member
 
Registered: Jan 2009
Location: vijayawada, India
Distribution: openSUSE 11.2, Ubuntu 9.0.4
Posts: 1,155
Blog Entries: 12

Rep: Reputation: 92
Cool

if it is DOS fs then use

Code:
/sbin/mkdosfs -v -F 32 -n USBDISKNAME /dev/sdb4
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
format a hard drive (/dev/hda1) in Reiser fs format Linh Linux - General 7 06-17-2009 06:30 AM
fdisk command is trying to format my cdrom drive! justintime24 Linux - Newbie 14 03-27-2008 04:50 PM
Shell - command to get the DVD disk label ankit_mcgill Linux - Newbie 6 09-24-2007 03:25 PM
Linux command to get the DVD label? jrfk2 Linux - General 7 01-15-2006 08:39 AM
change partition label w/o format gjo Linux - General 5 06-28-2005 12:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:28 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
Open Source Consulting | Domain Registration