5 lines
227 B
Bash
Executable file
5 lines
227 B
Bash
Executable file
#!/bin/sh -e
|
|
# Displays the latest files in the given directory or pwd
|
|
test "$1" = "-a" && all=true && shift
|
|
find "${1:-$PWD}" -maxdepth 4 -type f -printf '%.16T+ %P\n' |
|
|
sort -r | $(test "$all" && echo "less" || echo "head")
|