- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Directory Listing
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
Discussions
Discussions
Forums
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
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
тАО05-07-2004 05:42 AM
тАО05-07-2004 05:42 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2004 05:44 AM
тАО05-07-2004 05:44 AM
Re: Directory Listing
find /dir_to_look_for -type f -group "group_name" -exec ll {} \;
Crude method
ll -R /dir|grep "user/group"
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2004 05:46 AM
тАО05-07-2004 05:46 AM
Re: Directory Listing
find . -user uname -print
OR
find . -group gname -print
If you need more detailed listings then your the -exec option.
e.g.
find . -user uname -type f -exec ls -l {} \;
This will recursively descend a file tree from the current directory and list the files.
Man find for details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2004 05:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2004 06:56 AM
тАО05-07-2004 06:56 AM
Re: Directory Listing
Your command is almost working but I get some users out of the group sort. I need the out put to be sorted by group as first priority and username by second priority.
I did a ls -als to the directory and looked at the out put and noticed the 5th field was group.
so I typed ls -als /dir |sort -k 5,5
USer name is 4th field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2004 08:17 AM
тАО05-07-2004 08:17 AM
Re: Directory Listing
I do not have a UX box online to test it (so i am not sure if this works), but if you want to sort is first on user 4 Colomn and second on group 5 Colomn ( 1st prio) , you are allowed to use multiple -k strings:
ls -als /dir | sort -k 5,5 -k 4,4
Regards,
Gideon