by shigemk2

当面は技術的なことしか書かない

2017-12-16から1日間の記事一覧

truncate

man truncate shrink or extend the size of a file to the specified size 使い方(cheatコマンドから) $ cheat truncate # To clear the contents from a file: truncate -s 0 file.txt # To truncate a file to 100 bytes: truncate -s 100 file.txt # T…

pv

pv - Pipe Viewer - is a terminal-based tool for monitoring the progress of data through a pipeline. パイプラインの進捗をモニタリングするツール。 例 $ truncate -s 10G hoge.txt $ pv hoge.txt | gzip > hoge.txt.gz 3.56GiB 0:00:22 [ 166MiB/s] […