Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #204667 > unrolled thread
| Started by | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| First post | 2019-01-26 15:40 +0100 |
| Last post | 2019-01-29 19:30 +0100 |
| Articles | 20 on this page of 56 — 15 participants |
Back to article view | Back to linux.debian.user
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
Page 1 of 3 [1] 2 3 Next page →
| From | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| Date | 2019-01-26 15:40 +0100 |
| Subject | Partition information as text file? |
| Message-ID | <xkxhL-3zv-3@gated-at.bofh.it> |
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? TIA
[toc] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2019-01-26 18:10 +0100 |
| Message-ID | <xkzCV-589-17@gated-at.bofh.it> |
| In reply to | #204667 |
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.
[toc] | [prev] | [next] | [standalone]
| From | Felix Miata <mrmazda@earthlink.net> |
|---|---|
| Date | 2019-01-26 20:40 +0100 |
| Message-ID | <xkBY5-6rj-9@gated-at.bofh.it> |
| In reply to | #204667 |
Richard Owlett composed on 2019-01-26 08:32 (UTC-0600): > 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? I don't use a spreadsheet. I use the logs automatically created by the non-FOSS partitioner I use, DFSee. Various examples of its logs are here: http://fm.no-ip.com/Tmp/Dfsee/ http://fm.no-ip.com/Tmp/Dfsee/gb250L04.txt is from GPT partitioning for UEFI. The gb250 is the hostname. The L04 is serialization of the report's creation. It's content is reduced to that which I find useful data for tracking what's where among my 100+ disks. Sometimes I append output from lsblk or parted -l. hdparm and smartctl might also provide some of what you're looking for. -- Evolution as taught in public schools is religion, not science. Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/
[toc] | [prev] | [next] | [standalone]
| From | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| Date | 2019-01-26 22:20 +0100 |
| Message-ID | <xkDwR-7tQ-3@gated-at.bofh.it> |
| In reply to | #204686 |
On 01/26/2019 01:32 PM, Felix Miata wrote: > Richard Owlett composed on 2019-01-26 08:32 (UTC-0600): > >> 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? > > I don't use a spreadsheet. I was using "spreadsheet" in the most possible generic way ;/ > I use the logs automatically created by the non-FOSS > partitioner I use, DFSee. My goal is more "report on reality" rather than "create a reality". > Various examples of its logs are here: > > http://fm.no-ip.com/Tmp/Dfsee/ > > http://fm.no-ip.com/Tmp/Dfsee/gb250L04.txt is from GPT partitioning for UEFI. I _quickly_ browsed those sites. I don't think they were attempting to *ANSWER* "my questions". > > The gb250 is the hostname. The L04 is serialization of the report's creation. It's > content is reduced to that which I find useful data for tracking what's where among > my 100+ disks. > > Sometimes I append output from lsblk or parted -l. > > hdparm and smartctl might also provide some of what you're looking for. > I'll attempt to redefine my problem. I have: multiple machines each having multiple disks each having multiple partitions. I wish to inventory the above "conglomeration". I wish to to answer the question(s): How big is each How much is available OWL now DUCKS fer cover ;/
[toc] | [prev] | [next] | [standalone]
| From | "Alexander V. Makartsev" <avbetev@gmail.com> |
|---|---|
| Date | 2019-01-26 23:00 +0100 |
| Message-ID | <xkE9A-7Hz-5@gated-at.bofh.it> |
| In reply to | #204688 |
[Multipart message — attachments visible in raw view] — view raw
On 27.01.2019 2:10, Richard Owlett wrote: > On 01/26/2019 01:32 PM, Felix Miata wrote: >> Richard Owlett composed on 2019-01-26 08:32 (UTC-0600): >> >>> 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? >> >> I don't use a spreadsheet. > > I was using "spreadsheet" in the most possible generic way ;/ > >> I use the logs automatically created by the non-FOSS >> partitioner I use, DFSee. > > My goal is more "report on reality" rather than "create a reality". > >> Various examples of its logs are here: >> >> http://fm.no-ip.com/Tmp/Dfsee/ >> >> http://fm.no-ip.com/Tmp/Dfsee/gb250L04.txt is from GPT partitioning >> for UEFI. > > I _quickly_ browsed those sites. > I don't think they were attempting to *ANSWER* "my questions". > >> >> The gb250 is the hostname. The L04 is serialization of the report's >> creation. It's >> content is reduced to that which I find useful data for tracking >> what's where among >> my 100+ disks. >> >> Sometimes I append output from lsblk or parted -l. >> >> hdparm and smartctl might also provide some of what you're looking for. >> > > I'll attempt to redefine my problem. > > I have: > multiple machines > each having > multiple disks > each having > multiple partitions. > > I wish to inventory the above "conglomeration". > > I wish to to answer the question(s): > How big is each > How much is available > > OWL now DUCKS fer cover ;/ > > Maybe some non-standard utility will fulfill your needs? Try installing "inxi" and type: $ inxi -DRoplu It has many options and also different output settings. -- With kindest regards, Alexander. ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org ⠈⠳⣄⠀⠀⠀⠀
[toc] | [prev] | [next] | [standalone]
| From | Felix Miata <mrmazda@earthlink.net> |
|---|---|
| Date | 2019-01-27 03:10 +0100 |
| Message-ID | <xkI3v-1Se-1@gated-at.bofh.it> |
| In reply to | #204688 |
Richard Owlett composed on 2019-01-26 15:10 (UTC-0600): > Felix Miata wrote: >> Richard Owlett composed on 2019-01-26 08:32 (UTC-0600): >> I don't use a spreadsheet. > I was using "spreadsheet" in the most possible generic way ;/ >> http://fm.no-ip.com/Tmp/Dfsee/ >> http://fm.no-ip.com/Tmp/Dfsee/gb250L04.txt is from GPT partitioning for UEFI. > I _quickly_ browsed those sites. > I don't think they were attempting to *ANSWER* "my questions". Those other than gb250L04.txt were examples of the realities reported by the logging processes, while gb250L04.txt is one of the log remainders kept that comprise my actual inventory. That directory is not my actual inventory. > I'll attempt to redefine my problem. > I have: > multiple machines As I, >25. > each having > multiple disks Most of mine have but one. With three exceptions, those with more than one have more than one because of RAID. > each having > multiple partitions. Two of mine have more than 50, several more than 40, most between 12 and 30. > I wish to inventory the above "conglomeration". > I wish to to answer the question(s): > How big is each > How much is available What's missing in what I keep is freespace available on filesystems, which I don't try to keep track of, but the tool I use probably could include that as well. Unpartitioned space is as obvious as partition sizes. -- Evolution as taught in public schools is religion, not science. Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2019-01-27 22:30 +0100 |
| Message-ID | <xl0a6-4zd-17@gated-at.bofh.it> |
| In reply to | #204688 |
On Sat 26 Jan 2019 at 15:10:55 (-0600), Richard Owlett wrote: > On 01/26/2019 01:32 PM, Felix Miata wrote: > > Richard Owlett composed on 2019-01-26 08:32 (UTC-0600): > > > > > 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? […] > > Sometimes I append output from lsblk or parted -l. > > > > hdparm and smartctl might also provide some of what you're looking for. > > I'll attempt to redefine my problem. > > I have: > multiple machines > each having > multiple disks > each having > multiple partitions. > > I wish to inventory the above "conglomeration". > > I wish to to answer the question(s): > How big is each > How much is available It appears that you're really interested in the filesystems' information rather than the partitions', with the exception of the filesystem LABELs, which you have said elsewhere you use as indications of the filesystems' contents. So it looks as if df --output -x tmpfs -x devtmpfs gives you all you want (and more) with the exception of LABELs. It seems sensible to use lsblk -o NAME,LABEL -l to get these because AFAICT it automatically handles the business of selecting e2label/dosfslabel/etc as appropriate and gets them all in a heap. With judicious use of head, tail and sort, it would be fairly simple to get the two listings to correspond well enough for entry into a spreadsheet (I don't know what you meant by 'generic'), making final adjustments (df omits the device and partitions like swap) to line things up. > OWL now DUCKS fer cover ;/ No need. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| Date | 2019-01-28 13:50 +0100 |
| Message-ID | <xlewq-5xm-9@gated-at.bofh.it> |
| In reply to | #204719 |
On 01/27/2019 03:26 PM, David Wright wrote: > On Sat 26 Jan 2019 at 15:10:55 (-0600), Richard Owlett wrote: >> On 01/26/2019 01:32 PM, Felix Miata wrote: >>> Richard Owlett composed on 2019-01-26 08:32 (UTC-0600): >>> >>>> 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? > […] >>> Sometimes I append output from lsblk or parted -l. >>> >>> hdparm and smartctl might also provide some of what you're looking for. >> >> I'll attempt to redefine my problem. >> >> I have: >> multiple machines >> each having >> multiple disks >> each having >> multiple partitions. >> >> I wish to inventory the above "conglomeration". >> >> I wish to to answer the question(s): >> How big is each >> How much is available > > It appears that you're really interested in the filesystems' > information rather than the partitions', with the exception of the > filesystem LABELs, which you have said elsewhere you use as > indications of the filesystems' contents. That's likely. There are some terminology issues I'll have to follow up on so that I'll use terms in ways compatible to others. > > So it looks as if df --output -x tmpfs -x devtmpfs gives you all > you want (and more) with the exception of LABELs. No. The man pages states it only looks at mounted partitions due to "...nonportable intimate knowledge of file system structures]. As I only have FAT and ext partitions, what I want should be doable if not already done. > It seems sensible > to use lsblk -o NAME,LABEL -l to get these because AFAICT it > automatically handles the business of selecting e2label/dosfslabel/etc > as appropriate and gets them all in a heap. > > With judicious use of head, tail and sort, it would be fairly simple > to get the two listings to correspond well enough for entry into a > spreadsheet (I don't know what you meant by 'generic'), making > final adjustments (df omits the device and partitions like swap) to > line things up. I'm going to have to reread this thread. There is something in the back of mind hinting at a solution. It will require some scripting to pull pieces together, but that was assumed to be likely anyway. Later.
[toc] | [prev] | [next] | [standalone]
| From | Ionel Mugurel Ciobîcă <I.M.Ciobica@gmail.com> |
|---|---|
| Date | 2019-01-28 16:50 +0100 |
| Message-ID | <xlhkC-7hR-7@gated-at.bofh.it> |
| In reply to | #204746 |
On 28-01-2019, at 06h 48'00", Richard Owlett wrote about "Re: Partition information as text file?" > On 01/27/2019 03:26 PM, David Wright wrote: > >On Sat 26 Jan 2019 at 15:10:55 (-0600), Richard Owlett wrote: > >>On 01/26/2019 01:32 PM, Felix Miata wrote: > >>>Richard Owlett composed on 2019-01-26 08:32 (UTC-0600): > >>> > >>>>I am attempting to create a spreadsheet to document the content of > >>>>multiple disks of multiple machines. > >>> You know, gparted is based on parted, that is text based. Also use fdisk, skdisk, etc. that are text based. You redirect their output into a text file that you can use in your spread sheet program (whatever that can be). For example fdisk -l (as root) will output all partitions on all disks from a system. You can grep it, pipe it to sed to modify stuff, awk to play with columns, etc. to make it look like you please. If you can ssh to those machine, you can do it like this: for m in machine1 machine2 machine3 ; do ssh $m fdisk -l done > file_with_all_partition_info_machines_1-3.txt If you plan to use that info to recreate partitions, use the dump version of sfdisk: sfdisk -d /dev/sda > sfdisk_dump_sda.txt that you can use to make those partitions to another drive: sfdisk /dev/sdX < sfdisk_dump_sda.txt If you want a graphical ouput, something along the lines of gparted, just grab the screen with import. I usually do this: sleep 3 ; import file.jpg on a terminal to make sure I have time to put the main window on focus for capturing. Ionel
[toc] | [prev] | [next] | [standalone]
| From | Pascal Hambourg <pascal@plouf.fr.eu.org> |
|---|---|
| Date | 2019-01-28 20:50 +0100 |
| Message-ID | <xll4R-17h-1@gated-at.bofh.it> |
| In reply to | #204746 |
Le 28/01/2019 à 13:48, Richard Owlett a écrit : >> >> So it looks as if df --output -x tmpfs -x devtmpfs gives you all >> you want (and more) with the exception of LABELs. > > No. The man pages states it only looks at mounted partitions due to > "...nonportable intimate knowledge of file system structures]. As I only > have FAT and ext partitions, what I want should be doable if not already > done. The total and used/free space in ext and FAT filesystems can be computed from the output of tune2fs -l/dumpe2fs -h and fsck.dos -n.
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2019-01-29 15:40 +0100 |
| Message-ID | <xlCIq-3AM-1@gated-at.bofh.it> |
| In reply to | #204777 |
[Multipart message — attachments visible in raw view] — view raw
On Tue, Jan 29, 2019 at 08:30:13AM -0600, Richard Owlett wrote: > I assume "fsck.dos" is a typo as > [https://dyn.manpages.debian.org/jump?suite=stretch&binarypkg=dosfstools§ion=8&language=en&q=fsck.dos] > yields > "Sorry, the manpage “fsck.dos” was not found!" You have the manpages on your box, hopefully. Try "man -k fsck", and you'll get: tomas@trotzki:~$ man -k fsck dosfsck (8) - check and repair MS-DOS filesystems e2fsck (8) - check a Linux ext2/ext3/ext4 file system e2fsck.conf (5) - Configuration file for e2fsck exfatfsck (8) - check an exFAT file system fsck (8) - check and repair a Linux filesystem fsck.cramfs (8) - fsck compressed ROM file system fsck.exfat (8) - check an exFAT file system fsck.ext2 (8) - check a Linux ext2/ext3/ext4 file system fsck.ext3 (8) - check a Linux ext2/ext3/ext4 file system fsck.ext4 (8) - check a Linux ext2/ext3/ext4 file system fsck.fat (8) - check and repair MS-DOS filesystems fsck.hfs (8) - HFS file system consistency check fsck.hfsplus (8) - HFS file system consistency check fsck.minix (8) - check consistency of Minix filesystem fsck.msdos (8) - check and repair MS-DOS filesystems fsck.nfs (8) - Dummy fsck.nfs script that always returns success. fsck.vfat (8) - check and repair MS-DOS filesystems git-fsck (1) - Verifies the connectivity and validity of the objects in the database git-fsck-objects (1) - Verifies the connectivity and validity of the objects in the database hpfsck (1) - check integrity of an HFS+ volume So I'd try fsck.fat or similar (/if/ it has to be fat, that is) > Thanks for trying. That's how we advance, after all :) > What bugs me is Gparted [though it does not output text] reports > used/unused space on each partition/file system. I can't grok this one: shouldn't gparted report on it? Or you don't expect the free space to be there? Cheers -- t > > > > > > >
[toc] | [prev] | [next] | [standalone]
| From | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| Date | 2019-01-29 16:30 +0100 |
| Message-ID | <xlDuO-47R-17@gated-at.bofh.it> |
| In reply to | #204797 |
On 01/29/2019 08:37 AM, tomas@tuxteam.de wrote: > On Tue, Jan 29, 2019 at 08:30:13AM -0600, Richard Owlett wrote: > >> I assume "fsck.dos" is a typo as >> [https://dyn.manpages.debian.org/jump?suite=stretch&binarypkg=dosfstools§ion=8&language=en&q=fsck.dos] >> yields >> "Sorry, the manpage “fsck.dos” was not found!" > > You have the manpages on your box, hopefully. Try "man -k fsck", and you'll get: > [snip sample output] I avoid using "man" as I find the HTML of online pages friendlier. Also in the past I was reading man pages more frequently to chose whether or not to install a particular package than to explore what an installed package could do for me. I didn't know of the "-k" option. I haven't come across an equivalent function online. I may not use "man" to read, but "man -k" should be very useful for deciding which online pages I wish to read. > > So I'd try fsck.fat or similar (/if/ it has to be fat, that is) > >> Thanks for trying. > > That's how we advance, after all :) > >> What bugs me is Gparted [though it does not output text] reports >> used/unused space on each partition/file system. > > I can't grok this one: shouldn't gparted report on it? Or you don't > expect the free space to be there? Gparted displays the desired data in the GUI, but I see no way to get that information as a text stream. I need a text file for my application. Thanks
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2019-01-29 16:40 +0100 |
| Message-ID | <xlDEu-4b5-25@gated-at.bofh.it> |
| In reply to | #204800 |
[Multipart message — attachments visible in raw view] — view raw
On Tue, Jan 29, 2019 at 09:22:42AM -0600, Richard Owlett wrote: > On 01/29/2019 08:37 AM, tomas@tuxteam.de wrote: > >On Tue, Jan 29, 2019 at 08:30:13AM -0600, Richard Owlett wrote: > > > >>I assume "fsck.dos" is a typo as > >>[https://dyn.manpages.debian.org/jump?suite=stretch&binarypkg=dosfstools§ion=8&language=en&q=fsck.dos] > >> yields > >>"Sorry, the manpage “fsck.dos” was not found!" > > > >You have the manpages on your box, hopefully. Try "man -k fsck", and you'll get: > >[snip sample output] > > I avoid using "man" as I find the HTML of online pages friendlier. Mileages tend to vary wildly. Me, I don't like HTML very much. The heavy handed markup tends to interfere with the "text-ness" I appreciate in documentation. > Also in the past I was reading man pages more frequently to chose > whether or not to install a particular package than to explore what > an installed package could do for me. > > I didn't know of the "-k" option. I haven't come across an > equivalent function online. I may not use "man" to read, but "man > -k" should be very useful for deciding which online pages I wish to > read. See also "apropos". > >>What bugs me is Gparted [though it does not output text] reports > >>used/unused space on each partition/file system. > > > >I can't grok this one: shouldn't gparted report on it? Or you don't > >expect the free space to be there? > > Gparted displays the desired data in the GUI, but I see no way to > get that information as a text stream. I need a text file for my > application. Aha. Now I understood. But am not versed enough in gparted to be able to help you :-/ Cheers -- t
[toc] | [prev] | [next] | [standalone]
| From | "Thomas Schmitt" <scdbackup@gmx.net> |
|---|---|
| Date | 2019-01-29 17:20 +0100 |
| Message-ID | <xlEhc-4DT-11@gated-at.bofh.it> |
| In reply to | #204800 |
Hi, Richard Owlett wrote: > Gparted displays the desired data in the GUI, but I see no way to get that > information as a text stream. Well, it seems to inquire the info by filesystem specific means. The method is obviously named set_used_sectors(). See e.g. https://github.com/GNOME/gparted/blob/master/src/ext2.cc#L147 https://github.com/GNOME/gparted/blob/master/src/fat16.cc#L129 https://github.com/GNOME/gparted/blob/master/src/xfs.cc#L89 There are several source files from btrfs.cc to xfs.cc. One could harvest hints about which man pages to read in order to create some program which knows the inquiry commands for all filesystems which Gparted knows. (I dimly remember to have seen such inquiry/management program names in replies to this thread.) Have a nice day :) Thomas
[toc] | [prev] | [next] | [standalone]
| From | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| Date | 2019-01-31 15:20 +0100 |
| Message-ID | <xmlma-5Hu-1@gated-at.bofh.it> |
| In reply to | #204804 |
On 01/29/2019 10:16 AM, Thomas Schmitt wrote: > Hi, > > Richard Owlett wrote: >> Gparted displays the desired data in the GUI, but I see no way to get that >> information as a text stream. > > Well, it seems to inquire the info by filesystem specific means. > The method is obviously named set_used_sectors(). See e.g. > > https://github.com/GNOME/gparted/blob/master/src/ext2.cc#L147 > https://github.com/GNOME/gparted/blob/master/src/fat16.cc#L129 > https://github.com/GNOME/gparted/blob/master/src/xfs.cc#L89 > > There are several source files from btrfs.cc to xfs.cc. One could harvest > hints about which man pages to read in order to create some program which > knows the inquiry commands for all filesystems which Gparted knows. > (I dimly remember to have seen such inquiry/management program names > in replies to this thread.) > Though I not a C programmer, their organization leads to answers for my questions [even a few I hadn't asked]. They create an interesting homework assignment. "If retirement isn't for learning, what use is it?" Thank you.
[toc] | [prev] | [next] | [standalone]
| From | "Thomas Schmitt" <scdbackup@gmx.net> |
|---|---|
| Date | 2019-01-31 16:00 +0100 |
| Message-ID | <xmlYR-5UK-7@gated-at.bofh.it> |
| In reply to | #204860 |
Hi, Richard Owlett wrote: > Though I not a C programmer, their organization leads to answers for my > questions [even a few I hadn't asked]. It's C++ in this case. (bleh ...) But what i meant is that Gparted runs external programs, which a simple shell script could do too. https://github.com/GNOME/gparted/blob/master/src/ext2.cc#L147 uses dumpe2fs -h ...partition.path... and if the partition is not mounted resize2fs -P ...partition.path... https://github.com/GNOME/gparted/blob/master/src/fat16.cc#L129 uses fsck.fat -n -v ...partition.path... or if that is not present dosfsck -n -v ...partition.path... The Gparted C++ code then looks for particular text snippets in the output of the programs in order to read the numbers which follow. One may suck more hints from the programmers' comments in the lines which begin by "//". Have a nice day :) Thomas
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2019-01-31 20:30 +0100 |
| Message-ID | <xmqc9-ai-1@gated-at.bofh.it> |
| In reply to | #204866 |
On Thu 31 Jan 2019 at 15:54:57 (+0100), Thomas Schmitt wrote: > Richard Owlett wrote: > > Though I not a C programmer, their organization leads to answers for my > > questions [even a few I hadn't asked]. > > It's C++ in this case. (bleh ...) > > But what i meant is that Gparted runs external programs, which a simple > shell script could do too. > > https://github.com/GNOME/gparted/blob/master/src/ext2.cc#L147 > uses > dumpe2fs -h ...partition.path... > and if the partition is not mounted > resize2fs -P ...partition.path... > > https://github.com/GNOME/gparted/blob/master/src/fat16.cc#L129 > uses > fsck.fat -n -v ...partition.path... > or if that is not present > dosfsck -n -v ...partition.path... > > The Gparted C++ code then looks for particular text snippets in the > output of the programs in order to read the numbers which follow. > > One may suck more hints from the programmers' comments in the lines > which begin by "//". So going back to the OP, is this a sensible approach to choose instead of letting mount and df figure things out for themselves? Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | "Thomas Schmitt" <scdbackup@gmx.net> |
|---|---|
| Date | 2019-01-31 21:10 +0100 |
| Message-ID | <xmqOR-DS-5@gated-at.bofh.it> |
| In reply to | #204871 |
Hi, Richard Owlett wrote: > > > What bugs me is Gparted [though it does not output text] reports > > > used/unused space on each partition/file system. i wrote: > > [...] Gparted runs external programs, which a simple > > shell script could do too. David Wright wrote: > So going back to the OP, is this a sensible approach to choose instead > of letting mount and df figure things out for themselves? It's what Gparted does and what Richard mentioned as example of the desired information. Given that the source code of Gparted is published, we do not have to speculate how it does this, but rather can riddle over its C++ code. (The ext2 specific code distinguishes between mounted and not mounted partitions. The FAT related code seems not to do.) Have a nice day :) Thomas
[toc] | [prev] | [next] | [standalone]
| From | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| Date | 2019-02-01 15:10 +0100 |
| Message-ID | <xmHG2-2yT-9@gated-at.bofh.it> |
| In reply to | #204874 |
On 01/31/2019 02:03 PM, Thomas Schmitt wrote: > Hi, > > Richard Owlett wrote: >>>> What bugs me is Gparted [though it does not output text] reports >>>> used/unused space on each partition/file system. > > i wrote: >>> [...] Gparted runs external programs, which a simple >>> shell script could do too. > > David Wright wrote: >> So going back to the OP, is this a sensible approach to choose instead >> of letting mount and df figure things out for themselves? > > It's what Gparted does and what Richard mentioned as example of the desired > information. I'd make that statement stronger. My starting point was Gparted displays *ALL* the desired information for *ALL* members of the set [ /dev/sd* ] whether mounted or not. That PROVED that what I wanted was possible. It's "suitability to purpose" was degraded on *2* counts: 1. it does not output the data as a text file. 2. it displays information for only 1 device at a time. > Given that the source code of Gparted is published, we do not > have to speculate how it does this, but rather can riddle over its C++ code. Having known working source code for a program that almost meets my needs/desires remedies a major deficiency of the man page format -- [/begin_rant almost total lack of examples /end_rant ;] > > (The ext2 specific code distinguishes between mounted and not mounted > partitions. The FAT related code seems not to do.) > > > Have a nice day :) > > Thomas > > >
[toc] | [prev] | [next] | [standalone]
| From | "Thomas Schmitt" <scdbackup@gmx.net> |
|---|---|
| Date | 2019-02-01 15:30 +0100 |
| Message-ID | <xmHZn-2Fb-1@gated-at.bofh.it> |
| In reply to | #204888 |
Hi, Richard Owlett wrote: > [Gparted] PROVED that what I wanted was possible. Regrettably it does not retrieve the information by some universal info program or library, but rather has particular info sources for each of the supported filesystems. (There are more filesystems around than i can see in the Gparted source.) > It's "suitability to purpose" was degraded on *2* counts: > 1. it does not output the data as a text file. So you need one or more scripts which apply the program runs learned from Gparted to your partition device files and which then pick the desired numbers out of the text output from those programs. Then the script[s] would put out the retrieved numbers in the text format which you desire. > man page format [...] almost total lack of examples [...] If you refer to Gparted's man page, then the answer is obviously that nobody expects hard info from the manual of a clicky-colorful GUI program. (I.e. not "RTFM" but "RTSL" = "Read The Source, Luke.") Have a nice day :) Thomas
[toc] | [prev] | [next] | [standalone]
Page 1 of 3 [1] 2 3 Next page →
Back to top | Article view | linux.debian.user
csiph-web