8000 sort downloads directory by time · Issue #182 · dylanaraps/fff · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
sort downloads directory by time #182
Open
@Docbroke

Description

@Docbroke

example code

	## sort by time in downloads dirs
    IFS=$'\n' 
	if [[ $PWD == ~/Downloads* ]]; then
		dirs=($(stat -c '%Y=%n' "${dirs[@]}" | sort -nr | cut -d '=' -f2))
		files=($(stat -c '%Y=%n' "${files[@]}" | sort -nr | cut -d '=' -f2))
	fi
    unset IFS
    
    list=("${dirs[@]}" "${files[@]}")

pull request #184

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0