Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Linux Commands»Find All files Owned by a Specific User in Unix/Linux

    Find All files Owned by a Specific User in Unix/Linux

    By RahulAugust 16, 20201 Min ReadUpdated:August 16, 2020

    In some cases you may required to search all files owned by a particular user on Linux system. For example, you are hosting a cPanel server and there are mismatch with size of quota and home directory of user. In that case some of the files owned by user are outside of there home directory.

    Advertisement

    To find all files on the server owned by that user run the following command.

    find / -user $USERNAME 
    

    Replace $USERNAME with the actual username to whom you need to search files.

    This command will search files owned by a particular user in entire file system. So it will take a long time. It is a good idea to store output to a files instead of showing on terminal.

    find / -user $USERNAME > user-files.txt
    

    All the files owned by the given username will be stored user-files.txt file.

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Sed Command to Delete Lines in a File

    Sed Command to Delete Lines in a File

    Sort Command in Linux with Practical Examples

    15 Practical Examples of Sed Command

    Sed Command in Linux with 15 Practical Examples

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Error: EACCES: permission denied, scandir (Resolved)
    • How To Install Python 3.11 on Ubuntu 22.04 / 20.04
    • How to Install Python 3.11 on Amazon Linux 2
    • An Introduction to the “./configure” Command: Compiling Source Code in Linux
    • How to Install PHP 8.x on Pop!_OS
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.