Quantcast
Viewing all articles
Browse latest Browse all 6

Answer by internetuser2008 for Move files to another directory which are older than a date

$ find /sourcedirectory/ -maxdepth 1 -mtime +365 -exec mv "{}" /destination/directory/ \;

find: missing argument to `-exec'

Correct would be remove ending forward slash from /sourcedirectory/

$ find /sourcedirectory -maxdepth 1 -mtime +365 -exec mv "{}" /destination/directory/ \;

Viewing all articles
Browse latest Browse all 6

Trending Articles