I want to grep something inside a directory. But the user dontdoesn't have permissions in the direcotrydirectory. Because of some reasons, iI am not allowed to change permissions, group or owner. Just want to know iI can access that directory by some entry in the sudoers file.
grep -r "some phrase" /path/to/restricted-dir
Is there any way to execute the above command using SUDO. sudo?