SocialAds.biz Find the buzz on the best deals in town!

Google Analytics Blog

I Love Free Software

Friday, March 23, 2012

How to Get The First File in Unix

How to Get The First File in Unix: "In case you are looking files using ls or find command and only want to get the first file found, the command would be like.

ls -l /any/path/filename*|sed -e 's///,/g'|awk -F "," '{print $NF}'|head -1
Of course, you can also use it in find command."

'via Blog this'

No comments:

Post a Comment