Hacker News new | past | comments | ask | show | jobs | submit login

To this end I made a simple script, `latest`, which is, essentially, `ls -lt $@ | head`.

So, `latest *.log`, etc.

Other than that, simple autocomplete does a lot of my ls work for me.




I know you're showing a rough example, but others might want to throw a `-d` in there so that folders don't get expanded. And put `$@` in quotations so spaced file names don't get interpreted as separate arguments.

i.e.:

    ls -ltd "$@" | head
edit: `-d` may be a bad choice. It also results in directories being listed first on my system, even with `-t` passed.

edit 2: That was an alias I had setup. Carry on with the `-d`.


    find -type f -printf '%M@ %p\0' | sort -zn | tail -z | sed -z 's/^[0-9.]* //' | ...
Ugh.. so unixy




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: