I have a path in unix /aaa/trial/<xxx>.
means it has
<xxx> is a folder which will change for each extract produced and it is an increasing integer number.
I want to find the recent xxx folder
You should be able to ls | sort | tail -1.
ls | sort | tail -1
DIR /OG /O-D /B - the most recent folder will be listed first.
DIR /OG /O-D /B
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
1 year ago
9 months ago