あまり使わないので忘れそうだけどたまに使うやつ
$ docker system df # docker全体のディスク使用率
$ docker system df --verbose # dockerの各imageやcontainerのディスク使用率
/**************************************************************************** | |
* | |
* DirectInput keyboard scan codes | |
* | |
****************************************************************************/ | |
#define DIK_ESCAPE 0x01 | |
#define DIK_1 0x02 | |
#define DIK_2 0x03 | |
#define DIK_3 0x04 | |
#define DIK_4 0x05 |
'UE4Editor.exe' (Win32): Loaded 'D:\UE_Source\4.24Chaos\Engine\Binaries\Win64\UE4Editor.exe'. Symbols loaded. | |
'UE4Editor.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file. | |
'UE4Editor.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file. | |
'UE4Editor.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file. | |
'UE4Editor.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Cannot find or open the PDB file. | |
'UE4Editor.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'. Cannot find or open the PDB file. | |
'UE4Editor.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Cannot find or open the PDB file. | |
'UE4Editor.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'. Cannot find or open the PDB file. | |
'UE4Editor.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file. | |
'UE4Editor.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file. |
# https://docs.python.org/3/library/logging.config.html#configuration-dictionary-schema | |
version: 1 | |
formatters: | |
console_formatter: | |
# https://docs.python.org/ja/3/howto/logging.html#logging.logging.Formatter.__init__ | |
format: "%(asctime)s | %(name)20s | %(levelname)10s | %(threadName)8s | %(filename)20s:%(lineno)4d | %(message)s" | |
file_formatter: | |
format: "%(asctime)s | %(name)20s | %(levelname)10s | %(threadName)8s | %(filename)20s:%(lineno)4d | %(message)s" | |
handlers: | |
console_handler: |
#!/bin/bash -eux | |
# 別々の対象に対して同じスクリプトを実行したいが各実行で空いているGPUをそれぞれ割り当てていき全てのGPUを使っているときは | |
# 待ち(wait)に入り空きができたら空いた箇所のGPUを割り当てる | |
#!/bin/bash -eux | |
# [bash - What's a concise way to check that environment variables are set in a Unix shell script? - Stack Overflow](https://stackoverflow.com/a/307735/9316234) | |
#PCL_VERSION=1.9.1 | |
: "${PCL_VERSION:?Need to be set. (ex: '$ PCL_VERSION=4.1.0 ./xxx.sh')}" | |
# 'shared' or 'static' | |
: "${PCL_LIBS:?Need to be set. 'static' or 'shared' (ex: '$ PCL_LIBS=shared ./xxx.sh')}" | |
if [ ${PCL_LIBS} == "static" ]; then | |
PCL_SHARED_LIBS=OFF |
#!/bin/bash -eux | |
# encoding形式をUTF-8(DOM無し)に変換するコード | |
FILES=$(find . -type f) | |
for FILE in ${FILES}; do | |
ENC=$(nkf --guess ${FILE}) | |
# 動画等の"BINARY"ファイルには処理を行わない. | |
if [ "${ENC}" != "BINARY" ]; then | |
# この行をコメントアウトしてどのファイルがどのエンコーディングになるかを事前に確認するとよい. | |
nkf -Lu -d -w -w80 --in-place ${FILE} |
PIDが 52626
である場合
$ ps auxf | egrep -e "52626"
# [findコマンドで否定の指定方法 - ゆるゆると](http://d.hatena.ne.jp/litt/20071029/p1)
# !をつけるだけ。例えば hoge/ の中にある .sh ファイルを列挙したいけど hoge/huge/ の中のあるものは除くって場合
find hoge/ -name '*.sh' ! -path 'hoge/huge/*'
find コマンドで指定条件を除外(exclude)して、特定の拡張子を対象から消すには - それマグで!
#!/bin/bash -eux | |
#for i in {1..5000}; do | |
# echo ${i} | |
#done | |
for i in $(seq -f "%04g" 1 5000); do | |
mkdir ${i} | |
done |