LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-17-2009, 05:54 AM   #1
Willy Fog
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Rep: Reputation: 0
Get the label of a partition


Hello.

I'm trying to get the label from a NTFS partition.

I do fdisk -l and I see the partitions, but not the label.

How can I get the label ? For example, from dev/sda1

I have seen commands for change the label but not for read it only.

Thanks
 
Old 09-17-2009, 06:11 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
"blkid" may work depending on your distro - else try "ls -l /dev/disk/by-label"
 
Old 09-17-2009, 06:45 AM   #3
Willy Fog
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Oh man ! Really thanks.

blkid works!!

:-)

Thanks!
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
fdisk : how to label a partition? concoran Linux - Newbie 13 03-19-2017 08:15 PM
Label to partition association jackpal Linux - General 5 10-21-2008 02:41 AM
How to LABEL Swap partition badrat Linux - Certification 4 10-19-2006 10:33 PM
How can I rename the LABEL on my partition xkape Linux - General 3 01-18-2006 02:49 PM
change partition label w/o format gjo Linux - General 5 06-28-2005 12:50 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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