RRC|BIOSTATISTICS

Finding and Moving Recently Changed Files With the Terminal

The Problem: I got overzealous with organizing my files via the terminal. Whoops.

The Solution: Find files that were changed recently, sort them by size, then finally move those files to a new location, via the terminal.

Credit:

Solution cobbled together care of: GOTOFRITZ.NET and ASKUBUNTU.COM

What Worked:

sudo find ~/FOLDERNAME/ -name '*.FILETYPE' -type f -mtime -1 -print0 | xargs -0 du -sk | sort -nr | mv *.docx ~/FOLDERNAME/SUBFOLDERNAME/

Internet Says:

-exec -mv {} and mv -t filename

A warning though, these commands didn’t work for me.

Comments