I'm on linux an I want to know how to find the latest executable file in a directory? I already know how to find the latest with:
ls -rt1 | tail -1
but how to filter out executable files?
EDIT: I found a solution:
find path/to/dir/myfile* -perm /u=x,g=x,o=x -mtime 0 | tail -1
is this save? or is there a better solution??