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 04-19-2008, 11:06 AM   #1
okar
LQ Newbie
 
Registered: Apr 2008
Posts: 16

Rep: Reputation: 0
get information about hard disks


hi,

is there any command that prints some information about my harddisks.

like:
/dev/sda : space manufacturer etc.


thx
 
Old 04-19-2008, 12:06 PM   #2
bhaslinux
Member
 
Registered: Oct 2003
Location: UnitedKingdom
Distribution: Debian Lenny
Posts: 351

Rep: Reputation: 47
as root

smartctl -i <hard disk>
PS: this does not work for USB disks
 
Old 04-19-2008, 12:35 PM   #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 'lshw'.
 
Old 04-19-2008, 01:18 PM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
If you use sysfs, try this:
Code:
for f in  /sys/block/*/device; do d=${f%%/device*}; d=${d#/sys/block/}; echo "$d $(cat $f/vendor) $(cat $f/model)"; done
Space is a concept which applies to a partition, not just a device. You can use df to get this information.

If you have root access, you can use fdisk -l /dev/sda or similar to get a list of partitions for a given device. You can also get the size of the partition like this, although you won't get the amount of space used (that's what df is useful for).

Last edited by matthewg42; 04-19-2008 at 01:23 PM.
 
  


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
RH 3 ES won't see hard disks bangulu Linux - General 2 10-08-2006 03:15 PM
How to get hard disks onto desktop fullofhope Linux - Hardware 1 01-20-2005 07:52 AM
How many Hard disks ? BizHat.com Linux - Software 5 01-18-2005 07:38 PM
2 Hard Disks and 2 OS? How to? nbn792 Linux - General 5 12-26-2003 07:20 PM
2 Hard disks hadi Linux - Newbie 4 10-29-2003 02:34 PM


All times are GMT -5. The time now is 09:51 AM.

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