function ls-by-added() {
# Doesn't work well for files having '(null)' as their DateAdded, which some do.
mdls -name kMDItemFSName -name kMDItemDateAdded -raw -- *(D) | \
xargs -0 -I {} echo {} | \
sed 'N;s/\n/ /' | \
sort --reverse | \
sed -E "s/^.*\+0000 //" # removes the timestamps
}
No funciona para archivos de puntos:
ls-by-added
foo
How Automated Recommendations Affect the Playlist Creation Behavior of Users_k2opt.pdf
research_report_dc_02_k2opt.pdf
research_report_dc_02.pdf
thebookofshaders_k2opt.pdf
thebookofshaders.pdf
A New Kind of Science
- Books alias
Hein J. L. - Prolog Experiments in Discrete Mathematics, Logic, and Computability (2005)_k2opt.pdf
Hein J. L. - Prolog Experiments in Discrete Mathematics, Logic, and Computability (2005).pdf
geMsearch- Personalized Explorative Music Search.pdf
Lumanote- A Real-Time Interactive Music Composition Assistant.pdf
How Automated Recommendations Affect the Playlist Creation Behavior of Users.pdf
Computability-and-Logic_k2opt.pdf
Computability-and-Logic.pdf
(null) .rm
(null) .foo
(null) .DS_Store
¿Qué estoy haciendo mal? Intenté mdimport .
en el directorio de trabajo antes de ejecutar el comando, pero no me ayudó.