date --date=@$(expr `date +%s` - `cut -d "." -f 1 /proc/uptime`) exprは小数点を解釈できないので、cutで整数部分だけ切り出してます。bc使えば小数点の計算も可能ですが、手持ちの環境だとbcが入ってないサーバも多かったのでexprでやっております。 コマンド一発でいけるよって情報お待ちしてますw Register as a new user and use Qiita more conveniently You get articles that match your needsYou can efficiently read back useful informationYou can use dark themeWhat you can do with signing up