Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
How are you looking at the unix files from windows? FTP (from tags)? – parkydr Jul 4 '13 at 10:18
"Most recent" or "highest number"? – RJFalconer Jul 31 '14 at 14:40

You should be able to ls | sort | tail -1.

share|improve this answer
I need to get the folder name from the windows machine – karthika Jul 4 '13 at 10:11
Ask Cygwin to be installed. Nowadays installs itself very easily, quick and straightforward. Leverage Microsoft OS! – uprego Jul 4 '13 at 10:16

DIR /OG /O-D /B - the most recent folder will be listed first.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .