convert a video to gif
mkdir frames
ffmpeg -i input -vf scale=320:-1:flags=lanczos,fps=10 frames/ffout%03d.png
convert -loop 0 frames/ffout*.png output.gif
复制代码
copy file use ssh
scp -P port /path/to/file username@a:/path/to/destination
scp -P port username@b:/path/to/file /path/to/destination
复制代码
terminal startup time
Put
set -x
at the top and
set +x
at the bottom of both files ~/.profile and ~/.bashrc.
复制代码
show open ports
netstat -tlp | grep LISTEN
复制代码
startup command
/etc/rc.local
复制代码
use Vim edit Hex file
:%!xxd
to switch into hex mode:%!xxd -r
to exit from hex mode
modify a file inside a jar
jar uf jar-file input-file(s)
复制代码
make a large file
dd if=/dev/zero of=outputFile bs=2G count=1
复制代码