bash:find:find_the_most_recently_modified_file
BASH - Find - Find the most recently modified file
find . -type f -printf '%TY-%Tm-%Td %TT %p\n' | sort
Using awk
#!/bin/bash ls -lrt | grep ^- | awk 'END{print $NF}'
NOTE: This lists either the last updated or created file in your current working directory.
bash/find/find_the_most_recently_modified_file.txt · Last modified: 2022/06/13 09:06 by peter