1

Error while running bash script that moves files

view story
linux-howto

http://unix.stackexchange.com – I am new to bash script and want to create bash script that moves some days old files between source and destination as per days defined in script. When I run this script I get error find: paths must precede expression: mv Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression] #!/bin/bash echo "Enter Your Source Directory" read soure echo "Enter Your Destination Directory" read destination echo "Enter Days" read days find $soure -mtime +$days mv $soure $destination {} \; echo "Files $days old moved from $soure to $destination" (HowTos)