Skip to content

Instantly share code, notes, and snippets.

$TTL 86400
@ IN SOA localhost. root.localhost. (
2002122001 ; serial
28800 ; refresh 8hr
14400 ; retry 4hr
604800 ; expire 1w
86400 ; default_ttl 24hr
)
IN NS localhost.
$TTL 86400
@ IN SOA localhost. root.localhost. (
2018031100 ; serial
28800 ; refresh 8hr
14400 ; retry 4hr
604800 ; expire 1w
86400 ; default_ttl 24hr
)
IN NS localhost.
acl tmin-net {
192.168.11.0/27;
127.0.0.1;
};
options {
directory "/var/cache/bind";
pid-file "/var/run/named/named.pid";
recursion yes;
allow-query { tmin-net; };
subnet 192.168.11.0 netmask 255.255.255.0 {
option routers 192.168.11.1;
option subnet-mask 255.255.255.0;
option nis-domain "tmin.net";
option domain-name "tmin.net";
option domain-name-servers 192.168.11.1,210.158.149.33,210.158.150.33;
option ntp-servers 192.168.11.1;
option netbios-name-servers 192.168.11.1;
range 192.168.11.10 192.168.11.254;
#! /bin/sh
WAN=enp2s0
LAN=enp3s0
WANIP=`ip a | grep enp2s0 -A1 | grep inet | cut -f 6 -d ' ' | cut -f 1 -d '/'`
LANIP=192.168.11.1
LANSUBNET=192.168.11.0/24
##############
$ cd /var
$ pwd
/var
↓はカレントディレクトリ(/var)内表示。
$ ls
account crash gdm local mail run var
adm cvs gitrepos lock nis run.runmove~ www
backups db gopher lock.lockmove~ nmbd sharedata yp
cache empty kerberos log opt spool
@t-min
t-min / ls -l 2
Created September 28, 2016 02:12
$ ls -l /
合計 84
drwxrwxr-x 2 root root 4096 9月 20 04:18 bin 基本コマンドが入ってる
drwxr-xr-x 3 root root 4096 9月 20 04:26 boot システムブート用のいろいろが入ってる
drwxr-xr-x 18 root root 3180 9月 20 04:25 dev デバイスファイルが入ってる
drwxr-xr-x 154 root root 12288 9月 27 17:34 etc システム設定が入ってる
drwxr-xr-x. 7 root root 4096 8月 27 2015 home ユーザーのhomeディレクトリが入ってる
drwxr-xr-x 19 root root 4096 11月 21 2015 lib ライブラリが入ってる
drwxr-xr-x 2 root root 4096 9月 20 04:17 lib64 x64用のライブラリが入ってる
drwxr-xr-x 4 root root 4096 8月 17 15:14 media あらかじめ定義されたメディアデバイスがマウントされたりする
@t-min
t-min / ls -l
Created September 28, 2016 01:51
$ ls -l /
合計 84
drwxrwxr-x 2 root root 4096 9月 20 04:18 bin
drwxr-xr-x 3 root root 4096 9月 20 04:26 boot
drwxr-xr-x 18 root root 3180 9月 20 04:25 dev
drwxr-xr-x 154 root root 12288 9月 27 17:34 etc
drwxr-xr-x. 7 root root 4096 8月 27 2015 home
lrwxrwxrwx 1 root root 31 10月 17 2015 initrd.img -> /boot/initrd.img-3.16.0-4-amd64
drwxr-xr-x 19 root root 4096 11月 21 2015 lib
drwxr-xr-x 2 root root 4096 9月 20 04:17 lib64
$ ls --help
使用法: ls [オプション]... [ファイル]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.
Mandatory arguments to long options are mandatory for short options too.
-a, --all . で始まる要素を無視しない
-A, --almost-all . および .. を一覧表示しない
--author -l と合わせて使用した時、各ファイルの作成者を表示する
-b, --escape 表示不可能な文字の場合に C 形式のエスケープ文字を表示する
@t-min
t-min / lsmod
Created September 27, 2016 09:24
$ lsmod
Module Size Used by
xt_recent 17246 0
nls_utf8 12456 0
btrfs 863535 0
xor 21040 1 btrfs
raid6_pq 95238 1 btrfs
ufs 73443 0
qnx4 13036 0
hfsplus 101391 0