Linux / UNIX Tech Support Forum
This is a discussion on find out info. reg. files for each user in the system within the Solaris/OpenSolaris forums, part of the UNIX operating systems category; 1) I have a requirement where in I need to find and sort files user wise in a folder. The ...
|
Register free or login to your existing account and remove all advertisements. |
|
|||||||
| Solaris/OpenSolaris Discuss all about the SUN Solairs/OpenSolaris. You are free to talk about any issues related to Solaris administration, networking, services and other stuff, share information or ask doubts. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
1) I have a requirement where in I need to find and sort files user wise in a folder. The files can be situated in any subfolder that may also be hidden.
The files then need to be sorted according to size and date of creation. 2) Can we find out files for users who's entry is not there in /etc/passwd. |
| Sponsored Links | ||
|
|
|
|||
|
I am working on Solaris 9.0
Can I use sort for the any field. I have seen many files that are situated somewhere on the system and are owned by users who's IDs are either deleted or suspended. Can we find out these files by comparing the user validity in /etc/passwd. |
|
||||
|
Quote:
You can pass the -nouser -nogroup option to find command: Display list of files/dirs where user/group does not exists in (user) /etc/passwd (group) /etc/group file Code:
find / -nouser -nogroup -print Code:
find /home -nouser -nogroup >nousers.txt Use ls command, under solaris the output is sorted alphabetically by default. No UNIX and Linux OS stores the date of creation. They only stores the access/modification time so you cannot find out date of creation, however you can get the last accessed/modification date/time stamp via ls -c command. If you have a GNU find command then you can also try following else use above command on Solaris: Code:
find /home -nouser -nogroup -fprint nousers.txt |
|
||||
|
cant u use ls command?
ls -al | sort -n +{FIELD}
__________________
Rocky Jr. What's wrong? I hope I am not making you uncomfortable... Never send a boy to do a mans job. |
|
||||
|
Just read man pages of ls and sort. Do u wanna output sorted just home dir wise or what?
__________________
Rocky Jr. What's wrong? I hope I am not making you uncomfortable... Never send a boy to do a mans job. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| howto get my cpu info on linux system? | chiku | Linux software | 4 | 05-20-2008 09:06 PM |
| UNIX command to find out whether particular process of a particular user is running | Santosh Sharma | Shell scripting | 1 | 01-17-2008 04:26 PM |
| can not find user name in /etc/passwd file | subrata1in | Linux software | 2 | 03-26-2007 11:44 AM |
| Linux find and delete files | cbzee | Linux software | 4 | 12-20-2006 01:01 PM |
| USER INFO | asim.mcp | Linux software | 1 | 08-09-2006 04:18 AM |