Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Move Files That Match A find Pattern

Example:

Code

find /Users/alans/my-files/ -maxdepth 1 -name 'some-name-*' -print0 | xargs -0 -I{} mv {} /Users/alans/my-files/_archive/

Searches the directory:

/Users/alans/Dropbox/grimoire/

Finds files who's name starts with:

some-name-

Moves the files into:

/Users/alans/my-files/_archive/