Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #204678

Re: Partition information as text file?

From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: Partition information as text file?
Date 2019-01-26 18:10 +0100
Message-ID <xkzCV-589-17@gated-at.bofh.it> (permalink)
References <xkxhL-3zv-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat 26 Jan 2019 at 08:32:28 (-0600), Richard Owlett wrote:
> I am attempting to create a spreadsheet to document the content of
> multiple disks of multiple machines.
> 
> Gparted displays the desired information.
> *HOWEVER* I see no way to capture the information.
> 
> At the command line using "lsblk -o NAME,FSTYPE,LABEL /dev/sdb" gives
> most of the desired information.
> 
> It omits partition size, used space, and unused space.
> 
> Suggestions?

Just remove the g[nome] from the command name.

# parted -l
Model: ATA ST500LX005-1CW16 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name                          Flags
 1      1049kB  1050MB  1049MB  ntfs            Basic data partition          hidden, diag
 2      1050MB  1322MB  273MB   fat32           EFI system partition          boot, hidden, esp
 3      1322MB  2371MB  1049MB  fat32           Basic data partition          hidden
 4      2371MB  2505MB  134MB                   Microsoft reserved partition  msftres
 5      2505MB  178GB   175GB   ntfs            Basic data partition          msftdata
 6      178GB   220GB   41.9GB  ext4            Linux-A
 7      220GB   262GB   41.9GB  ext4            Linux-B
 8      262GB   452GB   191GB                   Linux-Home
 9      452GB   452GB   8389kB                  Linux-BIOS-Boot               bios_grub
10      452GB   457GB   4502MB  linux-swap(v1)  Linux-Swap
11      457GB   457GB   367MB   ntfs                                          hidden, diag
12      457GB   458GB   1074MB  ntfs            Basic data partition          msftdata
13      458GB   485GB   26.8GB  ntfs            Basic data partition          msftdata
14      485GB   500GB   15.1GB  ntfs            Basic data partition          hidden, diag

If you want a lot more information than is there, one method is:

$ for j in /sys/class/block/* ; do udevadm info "$j" ; done | less

but it will need parsing before you can can dump any of it in a
spreadsheet. (And note that the output is not in sequence because
of globbing.)

Cheers,
David.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Partition information as text file? Richard Owlett <rowlett@cloud85.net> - 2019-01-26 15:40 +0100
  Re: Partition information as text file? David Wright <deblis@lionunicorn.co.uk> - 2019-01-26 18:10 +0100
  Re: Partition information as text file? Felix Miata <mrmazda@earthlink.net> - 2019-01-26 20:40 +0100
    Re: Partition information as text file? Richard Owlett <rowlett@cloud85.net> - 2019-01-26 22:20 +0100
      Re: Partition information as text file? "Alexander V. Makartsev" <avbetev@gmail.com> - 2019-01-26 23:00 +0100
      Re: Partition information as text file? Felix Miata <mrmazda@earthlink.net> - 2019-01-27 03:10 +0100
      Re: Partition information as text file? David Wright <deblis@lionunicorn.co.uk> - 2019-01-27 22:30 +0100
        Re: Partition information as text file? Richard Owlett <rowlett@cloud85.net> - 2019-01-28 13:50 +0100
          Re: Partition information as text file? Ionel Mugurel Ciobîcă <I.M.Ciobica@gmail.com> - 2019-01-28 16:50 +0100
          Re: Partition information as text file? Pascal Hambourg <pascal@plouf.fr.eu.org> - 2019-01-28 20:50 +0100
            Re: Partition information as text file? <tomas@tuxteam.de> - 2019-01-29 15:40 +0100
              Re: Partition information as text file? Richard Owlett <rowlett@cloud85.net> - 2019-01-29 16:30 +0100
                Re: Partition information as text file? <tomas@tuxteam.de> - 2019-01-29 16:40 +0100
                Re: Partition information as text file? "Thomas Schmitt" <scdbackup@gmx.net> - 2019-01-29 17:20 +0100
                Re: Partition information as text file? Richard Owlett <rowlett@cloud85.net> - 2019-01-31 15:20 +0100
                Re: Partition information as text file? "Thomas Schmitt" <scdbackup@gmx.net> - 2019-01-31 16:00 +0100
                Re: Partition information as text file? David Wright <deblis@lionunicorn.co.uk> - 2019-01-31 20:30 +0100
                Re: Partition information as text file? "Thomas Schmitt" <scdbackup@gmx.net> - 2019-01-31 21:10 +0100
                Re: Partition information as text file? Richard Owlett <rowlett@cloud85.net> - 2019-02-01 15:10 +0100
                Re: Partition information as text file? "Thomas Schmitt" <scdbackup@gmx.net> - 2019-02-01 15:30 +0100
                Re: Partition information as text file? Richard Owlett <rowlett@cloud85.net> - 2019-02-01 16:10 +0100
                Re: Partition information as text file? <tomas@tuxteam.de> - 2019-02-01 16:30 +0100
                Re: Partition information as text file? David Wright <deblis@lionunicorn.co.uk> - 2019-02-01 17:10 +0100
                Re: Partition information as text file? Pascal Hambourg <pascal@plouf.fr.eu.org> - 2019-02-01 19:40 +0100
                Re: Partition information as text file? <tomas@tuxteam.de> - 2019-02-01 22:30 +0100
                Re: Partition information as text file? David Wright <deblis@lionunicorn.co.uk> - 2019-02-01 17:20 +0100
                Re: Partition information as text file? Richard Owlett <rowlett@cloud85.net> - 2019-02-01 18:10 +0100
                Re: Partition information as text file? David Wright <deblis@lionunicorn.co.uk> - 2019-02-02 02:10 +0100
                Re: Partition information as text file? <tomas@tuxteam.de> - 2019-02-02 11:00 +0100
                Re: Partition information as text file? David Wright <deblis@lionunicorn.co.uk> - 2019-02-02 16:30 +0100
                Re: Partition information as text file? <tomas@tuxteam.de> - 2019-02-02 17:20 +0100
                Re: Partition information as text file? rhkramer@gmail.com - 2019-02-01 17:00 +0100
                Re: Partition information as text file? David Wright <deblis@lionunicorn.co.uk> - 2019-02-01 17:10 +0100
                Re: Partition information as text file? Felix Miata <mrmazda@earthlink.net> - 2019-02-01 17:20 +0100
                Re: Partition information as text file? David Wright <deblis@lionunicorn.co.uk> - 2019-02-01 17:30 +0100
                Re: Partition information as text file? Joe <joe@jretrading.com> - 2019-02-01 19:10 +0100
                Re: Partition information as text file? Greg Wooledge <wooledg@eeg.ccf.org> - 2019-02-01 19:20 +0100
                Re: Partition information as text file? Dan Ritter <dsr@randomstring.org> - 2019-02-01 19:30 +0100
                Re: Partition information as text file? David Wright <deblis@lionunicorn.co.uk> - 2019-02-01 23:10 +0100
                Re: Partition information as text file? Peter Ehlert <peter@sdi-baja.com> - 2019-01-29 17:40 +0100
                Re: Partition information as text file? Jude DaShiell <jdashiel@panix.com> - 2019-01-29 19:00 +0100
            Re: Partition information as text file? Richard Owlett <rowlett@cloud85.net> - 2019-01-29 15:40 +0100
              Re: Partition information as text file? Pascal Hambourg <pascal@plouf.fr.eu.org> - 2019-01-29 21:10 +0100
                Re: Partition information as text file? Richard Owlett <rowlett@cloud85.net> - 2019-01-30 16:10 +0100
                Re: Partition information as text file? <tomas@tuxteam.de> - 2019-01-30 17:00 +0100
                Talking about loop devices (was: Re: Partition information as text file?) David <bouncingcats@gmail.com> - 2019-01-31 02:20 +0100
                Re: Talking about loop devices (was: Re: Partition information as  text file?) David <bouncingcats@gmail.com> - 2019-01-31 04:50 +0100
                Re: Talking about loop devices (was: Re: Partition information as  text file?) <tomas@tuxteam.de> - 2019-01-31 10:10 +0100
                Re: Talking about loop devices Pascal Hambourg <pascal@plouf.fr.eu.org> - 2019-01-31 20:00 +0100
                Re: Talking about loop devices David <bouncingcats@gmail.com> - 2019-02-01 06:30 +0100
                Re: Partition information as text file? Joe <joe@jretrading.com> - 2019-01-30 17:10 +0100
                Re: Partition information as text file? Richard Owlett <rowlett@cloud85.net> - 2019-01-31 15:30 +0100
                Re: Partition information as text file? Pascal Hambourg <pascal@plouf.fr.eu.org> - 2019-01-30 19:50 +0100
              Re: Partition information as text file? David <bouncingcats@gmail.com> - 2019-01-30 03:10 +0100
                Re: Partition information as text file? Richard Owlett <rowlett@cloud85.net> - 2019-01-30 16:20 +0100
          Re: Partition information as text file? David Wright <deblis@lionunicorn.co.uk> - 2019-01-29 19:30 +0100

csiph-web