How can I search the files based on the owner or group in command line?
Right now I have tried
ls -lR, that gives all the details of files in sub directories also, and I needed to manually search the files owned by root.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
You can use the
find /path/to/directory -user root
$ find /var -user gdm /var/lib/gdm /var/lib/gdm/.config /var/lib/gdm/.config/gnome-session /var/lib/gdm/.config/gnome-session/saved-session /var/lib/gdm/.config/ibus /var/lib/gdm/.config/ibus/bus /var/lib/gdm/.config/dconf /var/lib/gdm/.config/dconf/user ...