Friday, May 4, 2012

How to get the last modified item using ll command

touch file
echo "test" > file
cat `ll -ltr | tail -1 | awk '{print $8}'`

Result:
test

No comments:

Post a Comment