How do i copy files matching multiple conditions. Requirement is to search files starting with name abc* and def* and created on a particular date or date range given by the user and copy it to the destination folder.
i tried with different commands.
below one will give the list , but don't know how to copy.
ls -l | grep -e "abc" -e "def" |grep -i "May 21"
below one copies on one condition, don't know how to insert multiple condition
The output will list the filenames found followed by the matching record. Have a look at the -h & -l flags of grep if you want to exclude wither of these.
The first parameter of find is a directory name. It can be a dot for the current directory or should be a forward slash for directory names not the backslash and for a simple or list you can drop the brackets.