Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'or use some shell commands' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
or use some shell commands
Authored by: PatrickS on May 05, '09 10:24:32AM
Shell commands to do the same

for f in *; do
    dir=$(stat -f%SB -t%Y-%m-%d "$f")
    echo $f '->' $dir
    [ -d "$dir" ] || mkdir "$dir"
    mv "$f" "$dir"/
done
Replace the B in %SB by m for the last modification date of the file.

[ Reply to This | # ]