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