Linux の ls -t コマンド

ls -t オプション フラグは、ファイル/ディレクトリ リストを時刻/日付で並べ替えます。

構文

$ ls -t [options] [file|dir]

デフォルトのリスト:

$ ls
Desktop   Downloads Pictures Templates Videos
Documents Music     Public   todo.txt
$

 

日時順リスト

$ ls -t
Pictures Desktop   Downloads Public    Videos
todo.txt Documents Music     Templates
$

 

日付/時刻でソートされた長いリスト形式:

$ ls -lt
total 4
drwxr-xr-x 2 user user 120 2011-08-17 18:14 Pictures
-rw-r--r-- 1 user user 131 2011-08-17 18:07 todo.txt
drwxr-xr-x 2 user user  80 2011-08-17 16:52 Desktop
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Documents
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Downloads
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Music
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Public
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Templates
drwxr-xr-x 2 user user  40 2011-08-17 16:52 Videos
$

 


こちらもご覧ください

Advertising

LS コマンド
°• CmtoInchesConvert.com •°