linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc MERLIN <marc@merlins.org>
To: Sjon Hortensius <sjon@hortensius.net>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Fwd: btrfs Wiki account request
Date: Sun, 13 Jul 2014 07:49:32 -0700	[thread overview]
Message-ID: <20140713144932.GK10641@merlins.org> (raw)
In-Reply-To: <CAK_tfuY3cnPyrsTVvKVCcDsSC1SvchKmyc6tq7T8=+ErRhnbFQ@mail.gmail.com>

On Tue, Jul 08, 2014 at 10:19:08PM +0200, Sjon Hortensius wrote:
> I wrote a simple alternative for a script that is currently on the
> btrfs wiki (for showing quotas) in bash instead of Python. I have
> attempted to add this to the page but after entering the captcha 15
> times my account was rejected because of a missing bio. Maybe someone
> can add this to https://btrfs.wiki.kernel.org/index.php/Quota_support:
> 
> #!/bin/bash
> 
> [[ ! -d $1 ]] && { echo Please pass mountpoint as first argument >&2 ;
> exit 1 ; }
> 
> while read x i x g x x l x p
> do
>     volName[i]=$p
> done < <(btrfs subvolume list $1)
> 
> while read g r e
> do
>     [[ -z $name ]] && echo -e "subvol\tqgroup\ttotal\tunshared"
>     group=${g##*/}
>     [[ ! -z ${volName[group]} ]] && name=${volName[group]} || name='(unknown)'
>     echo $name $g `numfmt --to=iec $r` `numfmt --to=iec $e`
> done < <(btrfs qgroup show $1 | tail -n+3) | column -t

I added it to the page.

Best,
Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/                         | PGP 1024R/763BE901

      reply	other threads:[~2014-07-13 14:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <btrfswiki.52f1178eb44ca2.65163100@btrfs.wiki.kernel.org>
     [not found] ` <CAMqPLXUHJ8Gtc9r9cNVaaijp6VcEy_nLoeFxSWR_2ajevi+jcg@mail.gmail.com>
2014-07-08 20:19   ` Fwd: btrfs Wiki account request Sjon Hortensius
2014-07-13 14:49     ` Marc MERLIN [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140713144932.GK10641@merlins.org \
    --to=marc@merlins.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=sjon@hortensius.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).