ls -l を実行すると、パーミッションやmtimeなど詳細な情報が出力されるのに対して、find を実行してもオプションなしでは相対パス名しか表示されない。

$ ll
合計 0
-rw-r--r-- 1 root root 0  8月  6 10:00 2015 a
-rw-r--r-- 1 root root 0  8月  6 12:00 2015 b
-rw-r--r-- 1 root root 0  8月  5 22:00 2015 c

$ find ./*
./a
./b
./c

find でも ls -l と同じように詳細な情報を出力するには、-lsオプションをつける。-lsオプションは ls -dils と同じ効果を find の出力結果に適用してくれる。

$ find ./* -ls
271076    0 -rw-r--r--   1 root     root            0  8月  6 10:00 ./a
273136    0 -rw-r--r--   1 root     root            0  8月  6 12:00 ./b
273137    0 -rw-r--r--   1 root     root            0  8月  5 22:00 ./c

ls -dilsの各オプション説明

  • -d, --directory

    list directory entries instead of contents, and do not dereference symbolic links

  • -i, --inode

    print the index number of each file

  • -s, --size

    print the allocated size of each file, in blocks

findの表示系関連ページ

findの結果でファイル名だけを取得する方法