[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: parted is ALMOST suitable



On Mon, Nov 07, 2016 at 06:11:50AM -0600, Richard Owlett wrote:
I need to identify file system on all partitions of my hard drive whether mounted or not.
   parted /dev/sda print | grep ext | grep -v exte
reports the desired information [partitions formatted ext?] in a convenient format.
*HOWEVER* parted requires root privileges. That is not acceptable.
Suggestions?

parted probably wants root privileges because it is, by nature a PARTition EDitor.

Try, instead, "lsblk" (in package util-linux), which will LiSt BLocK devices. I'm not immediately sure how to get it to show ONLY partitions, but the following seems to work:

$ lsblk -l|awk 'NR==1||/part/'

(or just "|grep part" if you don't care about seeing the header :)


TIA




--
For more information, please reread.

Attachment: signature.asc
Description: PGP signature


Reply to: