My sessions directory is very large and I would like to count how many files are made by each separate user (each domain).
Is there an option (with ls
maybe) to count (not to list) total files made by a given user ?
I know that ls -alh dir_name
lists all files and user is on one of the columns.
And also that this counts all files: ls -1 dir_name | wc -l
Maybe command can be adjusted to do a search on the column containig the username, and then count the results?
If you know the
username
, this should work for you.