mdls restituisce '(null)'

2
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
}

Non funziona con i dotfile:

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

Che cosa sto sbagliando? Ho provato mdimport . sulla directory di lavoro prima di eseguire il comando, ma non ha aiutato.

    
posta HappyFace 10.08.2018 - 17:38
fonte

0 risposte

Leggi altre domande sui tag