ls -Art | tail -n 1
Not very elegant, but it works.
Used flags:
-A
list all files except .
and ..
-r
reverse order while sorting
-t
sort by time, newest first
More Related Contents:
- What’s the magic of “-” (a dash) in command-line parameters?
- How do I use the lines of a file as arguments of a command?
- GROUP BY/SUM from shell
- Execute command after every command in bash
- How to find directory of some command?
- How do you filter out all unique lines in a file?
- How do I send a file as an email attachment using Linux command line?
- What’s the best way to send a signal to all members of a process group?
- What does the number in parentheses shown after Unix command names in manpages mean?
- Is there a “goto” statement in bash?
- How can I generate new variable names on the fly in a shell script?
- How can I delete a newline if it is the last character in a file?
- Bash while read loop extremely slow compared to cat, why?
- Automatically capture output of last command into a variable using Bash?
- How to remove ^[, and all of the escape sequences in a file using linux shell scripting
- Redirect STDERR / STDOUT of a process AFTER it’s been started, using command line?
- Find multiple files and rename them in Linux
- How can I loop over the output of a shell command?
- How can I kill a process by name instead of PID, on Linux? [duplicate]
- My shell script stops after exec
- Linux command to print directory structure in the form of a tree
- How do I create a crontab through a script
- Bash Script – iterating over output of find
- How to only get file name with Linux ‘find’?
- Syntax with pound and percent sign after shell parameter name [duplicate]
- How to kill zombie process
- Get ceiling integer from number in linux (BASH)
- How can I trim white space from a variable in awk?
- Counter increment in Bash loop not working
- Check for IP validity