エントリーの編集
![loading...](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/common/loading@2x.gif)
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
![アプリのスクリーンショット](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/entry/app-screenshot.png)
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Ubuntuで起動時刻を取得する
PCの稼動時間は uptime コマンドで取得できますが、$ uptime 20:19:56 up 9:24, 3 users, load average:... PCの稼動時間は uptime コマンドで取得できますが、$ uptime 20:19:56 up 9:24, 3 users, load average: 0.11, 0.20, 0.21起動した日時を取得するには last コマンドで取得できます。$ last -R -1 reboot reboot system boot Tue Mar 24 10:55 - 20:20 (09:24) wtmp begins Sun Mar 1 16:13:24 2009あるいは、$ last -R -1 reboot | grep boot | awk '{print $4, $5, $6, $7}' Tue Mar 24 10:55で抜き出すとか。 後は現在時刻からuptimeで得られる稼働時間を引けば起動時刻が求められるので、計算して得るなら以下のようなシェルスクリプトを用意し、 #!/bin