Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a path in unix /aaa/trial/<xxx>.

means it has

/aaa/trial/123
/aaa/trial/124
/aaa/trial/125

<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 yesterday

2 Answers 2

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! –  galegosimpatico Jul 4 '13 at 10:16

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.