Linux: Finding all storage devices attached to a machine

0 votes
I'm trying to find all of the writable storage devices attached to a given machine, irrespective of if they are mounted.

I was curious if there is a better solution I could use?
Jun 10, 2019 in Linux Administration by Shubham
• 13,370 points
36 views

1 answer to this question.

0 votes
  1. Use /proc/partitions first. This will list all the block devices and partitions that your system recognizes. 
  2. Try using file -s <device> to determine what kind of filesystem is present on the partition, if there be any.
answered Jun 10, 2019 by Upasana
• 8,570 points

Related Questions In Linux Administration

0 votes
1 answer

How to display a simple list of all disks, like this /dev/sda /dev/sdb ?

You can list all the disk in ...READ MORE

answered Jul 12, 2018 in Linux Administration by DearestOne
• 200 points
138 views
0 votes
1 answer

How to create a symlink in Linux?

To create a symbolic link, you can ...READ MORE

answered Jan 31, 2019 in Linux Administration by Omkar
• 68,860 points
84 views
0 votes
1 answer

How to find the group associated with a user in linux?

To list all the groups groups or to list ...READ MORE

answered Jun 20, 2019 in Linux Administration by DareDev
• 6,830 points
70 views
0 votes
1 answer

How do I use a shell script to SSH in to a remote machine to execute commands?

Your first problem can be solved like ...READ MORE

answered Jun 27, 2019 in Linux Administration by ajs3033
• 7,280 points
93 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Adding yes/no/cancel prompts in shell script

You can use the read command. Here's ...READ MORE

answered Mar 12, 2019 in Linux Administration by ajs3033
• 7,280 points
62 views
0 votes
1 answer

How to change the default shell in Linux?

1. Change the password file directly for ...READ MORE

answered May 24, 2019 in Linux Administration by Upasana
• 8,570 points
46 views
0 votes
1 answer

To attach a file using mail command on Linux

$ echo | mutt -a syslogs.tar.gz admin@domain.org READ MORE

answered Jun 28, 2019 in Linux Administration by Upasana
• 8,570 points
377 views
0 votes
1 answer

generating a list of files with their absolute path in Linux

If you find an absolute path to start with, ...READ MORE

answered May 16, 2019 in Linux Administration by Upasana
• 8,570 points
50 views