I found a 6 GB IDE HDD in my basement. I want to plug it in and see what might be on it. The drive seems to be recognized in BIOS.
I can't find it in Ubuntu to view files, and Ubuntu is the only OS on that particular computer. I was wondering if Ubuntu has an equivalent to the Windows feature "My Computer", which lists all available drives/storage devices. Typically, My Computer shows C:, which can be opened to view all of your directories and files. At this point, it is very similar to Ubuntu's Home Folder.
How to view/select all available partitions of that drive or all available HDD's without formatting or tampering with the contents in any way?
There are many ways but my favorite is
lsblk
. Here is a demonstration:That would show the following:
It is showing:
You can play around with the options by first looking at the ones available with
lsblk --help
. I likelsblk
because of the friendly way of showing the information if compared for example withfdisk
orparted
.The command-line solution:
to check which drives your system can see:
If your drive is in the list, you'll be able to see what partitions are on the drive, like this:
Then create a directory somewhere and mount one of the partitions. For example, to mount a FAT32 partition located at
dev/sda3
read-only into directory/media/my_test_mount
you can doThis approach gives you more control, as you can use different mount options, for example mount the partition read-only.
See
man mount
for details.I second Luis in that
lsblk(8)
is probably the most straightforward and concise solution. It's very easy to visualize what is there and gives you all of the information needed quickly:For your convenience, here is a list of all available columns that can be used.
To list the hard drives/disks, I use
sudo parted -l
Output:
And then to list the partitions as other people have already suggested you can use:
Which will tell you the file system partition types
Nautilus (where you view your home folder) will show all mounted drives on the system. If the drive is recognized by the computer you can mount it and begin to use it.
Directions and information about mounting drives can be found here: https://help.ubuntu.com/community/Mount
Use the following command lines, that together will give you a good overview of the partitions (location, sizes, free space and mount points),
If your terminal window is wide enough (for example 130 characters), you can combine the
lsblk
commands toThe solution below is very easy, clear, a GUI approach and it shows you exactly what you have laid out on your HDD:
CAUTION: Do not change ANYTHING unless you know what you are doing!
(building on previous advise in regards to
lsblk
).For the lazy typist (and if you don't need the sizes) you can use:
which is same as using
-o NAME,FSTYPE,LABEL,MOUNTPOINT
for example
I have created some regex to help those who want to read this data into some application.
To do that, The lsblk command it is more usefully when you use the "-P" command. Here a example:
You can read this output usign some regex like
http://regex101.com/r/uX5eG3/1
If you don't need the size of the partition, you can use the mount -l to
And read it using some Regex like that
http://regex101.com/r/nE4pQ9/1
If you are doing that in node, you can convert the string into a array of occurrences using some code like
Late answer but try this: