User dot-files are hidden files in a user’s home directory that start with a dot (e.g. .bashrc
, .profile
). To list these files for a particular user in Linux/Unix, you can use the following command:
ls -a /home/username/.*
Replace username
with the actual username for the user whose dot-files you want to list.
Alternatively, you can use the find
command to locate and list all the dot-files:
find /home/username -maxdepth 1 -type f -name ".*"
This command will recursively search the user’s home directory for all files with a name that starts with a dot, and then output the list to the terminal. The maxdepth 1
option tells find
to search only the user’s home directory and not any subdirectories, while the -type f
option specifies that only regular files should be listed. The -name ".*"
option specifies that the filenames should start with a dot.