Wednesday, October 02, 2013

Solaris find newest file

Not as simple as it would be in Linux ;-)
$ find /my/directory/path/ -name "someOptionalPatternToFilter" -type f | sed 's/.*/"&"/' | xargs ls -E | awk '{ print $6," ",$7," ",$9 }' | sort | tail -1 | awk '{print $3}'

No comments:

Followers