Link to home
Start Free TrialLog in
Avatar of sminfo
sminfo

asked on

List orphans home directories on AIX.

Hi
I want to list the orphans home directories on our AIX's servers. You know when you delete a user but no its home, this directory remains in /home. All these folders are the ones I want to delete. I'd like to compare the home's directories with the stanza home= from lsuser output.

Thanks.
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Hello again,

A fast way:

for HOME in $(lsuser -a home ALL | cut -f2 -d"="); do [ ! -d $HOME ] && echo "Directory $HOME does not exist"; done

If you want to get the username listed as well please let me know!

wmp

ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sminfo
sminfo

ASKER

The second one. :-)

Thanks!!