Linux: Find User Files

Linux: Find User Files

To find a user's files on a Linux system, you can use the find command. Here's an example of how you might use it:

find / -user <username>
Source:w‮ww‬.lautturi.com

This will search the entire filesystem starting at the root (/) and look for files that are owned by the specified user. The -user option specifies the user owner of the files you want to find.

You can also specify a starting directory other than the root if you want to limit the search to a specific area. For example:

find /home -user <username>

This will search only the /home directory and its subdirectories for files owned by the specified user.

You can also use other options with find to further refine your search. For example, you can use the -type option to specify the type of file you want to find (e.g., -type f for regular files, -type d for directories). You can also use the -name option to search for files with a specific name or pattern.

For more information about the find command and its options, you can refer to the man page by running man find in a terminal.

Created Time:2017-10-30 10:17:44  Author:lautturi