[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using 'find' to look for all files that belong to 'owner'

From: Bernhard Voelker
Subject: Re: Using 'find' to look for all files that belong to 'owner'
Date: Mon, 23 Sep 2019 18:47:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0

On 2019-09-23 17:48, Mischa Baars wrote:
>    Hi,
>    I was trying to use 'find' to look for all files that belong to
>    'owner', to clean up any files still on the filesystem after removing
>    user 'owner'.
>    As far as I know, this is impossible with 'find'. Am I right? And if
>    so, is there any other way to do this?
>    Best regards,
>    Mischa Baars.

Sure, 'man find' says:

       -uid n File's numeric user ID is n.

       -user uname
              File is owned by user uname (numeric user ID allowed).

So there's a way to find files owned by the given user specified
either by user name or by user ID; the latter works also in the
case the user name was already deleted.

See also:

Have a nice day,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]