0
0

More than 3 years have passed since last update.

Linux ファイル や ディレクトリ の 詳しい タイムスタンプ を 表示する lsコマンドのオプション

Posted at

目的

  • Linuxの任意のディレクトリ内のファイルやディレクトリの詳しいタイムスタンプを出力するコマンドを知る。
  • ls -laコマンドより詳しいファイルタイムスタンプを出力する。

書き方の例

  • lsコマンドのオプションを利用する。
  • 下記のコマンドを実行するディレクトリには何かしらのファイルやディレクトリが存在するものとする
  • 下記にLinuxコマンドを記載する。
$ ls --full-time

具体的な例

  • 自分のWSLのUbuntu18.04でls --full-timeを実行する。
  • カレントディレクトリは/home/ユーザ名直下である。
  • 下記に実行した際のターミナルでの振る舞いを記載する。
shun@DESKTOP-AO64T0U:~$ pwd
/home/ユーザ名
shun@DESKTOP-AO64T0U:~$ ls --full-time
total 51928
drwxrwxrwx 1 shun shun      512 2019-09-14 16:33:08.872673300 +0900 first-bolt-app
drwxrwxrwx 1 shun shun      512 2019-09-18 20:59:51.091823900 +0900 git
-rwxr-xr-x 1 shun shun 26092507 2019-07-20 10:16:40.000000000 +0900 ngrok
-rw-rw-rw- 1 shun shun 13466618 2019-09-14 03:51:40.662887500 +0900 ngrok-stable-darwin-amd64.zip
-rw-rw-rw- 1 shun shun 13607069 2019-09-14 16:18:57.671792100 +0900 ngrok-stable-linux-amd64.zip
drwxrwxrwx 1 shun shun      512 2019-09-14 02:00:30.356899700 +0900 slack
drwxrwxrwx 1 shun shun      512 2019-09-14 16:18:27.861724200 +0900 test
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0