How do you copy files in Linux and how do you move files in Linux? Implement the function below to generate the corresponding shell command without executing it. Use cp for copying and mv for moving; directory copies must include the recursive -r option. The function receives an operation, source path, destination path, and directory flag, and returns a shell-safe command string.
def linux_file_command(operation, source, destination, is_directory):