- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Find out login name in hpux system who own files ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2004 06:00 AM
09-23-2004 06:00 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2004 06:04 AM
09-23-2004 06:04 AM
Re: Find out login name in hpux system who own files ?
Then you can do
find . -user "user_name" -type f -exec ll {} \;
find . -user "user_name" -type d -exec ll {} \;
The find command may burn a CPU lot.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2004 06:06 AM
09-23-2004 06:06 AM
Re: Find out login name in hpux system who own files ?
find /dirname -exec ll {} \; |sort -mu
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2004 06:09 AM
09-23-2004 06:09 AM
Solutionlogins | awk '{print $1}' | xargs -n1 | while read USER
do
NUM=$(find / -user $USER | wc -l)
[ $NUM -gt 1 ] && echo "$USER" > /tmp/users_who_own_files.txt
done
more /tmp/users_who_own_files.txt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2004 06:24 AM
09-23-2004 06:24 AM
Re: Find out login name in hpux system who own files ?
example to display /tmp-
diskusg /dev/vg00/lvol5
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2004 06:36 AM
09-23-2004 06:36 AM
Re: Find out login name in hpux system who own files ?
Have you tried "listusers". This will list all the users on the system. Almost the same as "logins -u".
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2004 08:46 AM
09-23-2004 08:46 AM
Re: Find out login name in hpux system who own files ?
Pete- kind of works but it gives me 1000 of files (and lines) for user like oracle. I just need to know what user have at least one file as being owned. Little tweaking from your command will possibly give me the output.
Sundar- time consuming but finally i will get the output. you forgot >> instead have >.
Rodney- nice command but need to do on each disk and then sort it
Sanjay- nice command to list users in a nice format but I see some users there that don't own any files. Thanks to all though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2004 09:17 AM
09-23-2004 09:17 AM
Re: Find out login name in hpux system who own files ?
for i in /dev/vg*/lvol* ; do
diskusg $i > dtmp.`basename $i` &
done
wait
diskusg -s dtmp.* >summaryreport
(with some minor editting by me)
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2004 04:01 PM
09-23-2004 04:01 PM
Re: Find out login name in hpux system who own files ?
# for user in `listusers | awk '{ print $1 }'`
> do
> echo "$user `find / -user $user -name "*" | wc -l`" >> /tmp/testlog.user &
> done
It will execute at once. To know the directory disk size easily then use,
du -ks
It will give the user directory size there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2004 05:23 AM
09-27-2004 05:23 AM