$ parted /dev/xvda
GNU Parted 2.1
/dev/xvda を使用
GNU Parted へようこそ! コマンド一覧を見るには 'help' と入力してください。
(parted) help
align-check TYPE N check partition N for TYPE(min|opt) alignment
check NUMBER ファイルシステムの簡単なチェックする
cp [転送元デバイス] 転送元NUMBER 転送先NUMBER
ファイルシステムを他のパーティションにコピーする
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
import json | |
import re | |
import sys | |
import subprocess | |
from optparse import OptionParser | |
parser = OptionParser() | |
parser.add_option("-i", "--ignores", dest="ignores", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
EPHEMERAL_DIR="/media/ephemeral0" | |
DISK="/dev/xvdb" | |
if ! mountpoint -q $EPHEMERAL_DIR; then | |
mkfs.ext4 $DISK | |
mount -t ext4 $DISK $EPHEMERAL_DIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<match foo.**> | |
type copy | |
<store> | |
type flowcounter | |
unit minute | |
count_keys * | |
tag flowcount.bar | |
</store> | |
</match> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ tree /tmp/foo | |
/tmp/foo | |
├── bar | |
│ ├── fuga | |
│ └── piyo | |
└── hoge | |
2 directories, 2 files | |
$ find /tmp/foo/ -maxdepth 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk -F ':' -v gid=GID '$3 == gid { print $1 }' /etc/group |
$ add-apt-repository ppa:duggan/bats --yes
gpg: keyring `/tmp/tmp_ijpu6ti/secring.gpg' created
gpg: keyring `/tmp/tmp_ijpu6ti/pubring.gpg' created
gpg: requesting key 5F28EA3F from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp_ijpu6ti/trustdb.gpg: trustdb created
gpg: key 5F28EA3F: public key "Launchpad PPA for Ross Duggan" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK