Shell command to get directory with least access date/time

前端 未结 6 1570
无人共我
无人共我 2021-01-29 01:45

Is there any sort option available in find command to get directory with least access date/time

6条回答
  •  轮回少年
    2021-01-29 02:16

     find . -type d -printf "%A@ %p\n" | sort -n | tail -n 1 | cut -d " " -f 2-
    

    If you prefer the filename without leading path, replace %p by %f.

提交回复
热议问题