User Tools

Site Tools


tips:linux:openlastmod

How to open the last modified file in a directory?

The best solution I found so far is using the following in a shell script:

for f in `ls -t /path/to/directory/*`; do
  vi $f
  break
done
tips/linux/openlastmod.txt · Last modified: 2009/06/14 11:48 by erik