LoginSignup
5
5

More than 5 years have passed since last update.

指定ディレクトリの中の指定ファイル名で最新のファイルパスを返却する

Last updated at Posted at 2014-07-17

指定ディレクトリの中の指定ファイル名で最新のファイルパスを返却する。

find.zsh
find {{指定ディレクトリ}} -type f | xargs ls -l --time-style=long-iso | sort -k 6,7 | grep {{ファイル名}} | tail -1 | gawk '{print \$NF}'
5
5
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
5
5