|
Working with multiple home directories.
I need to rename a directory in every home directory on a given workstation. I am a newb to scripting so maybe thats why I cant exactly figure out how to correctly do this.
The first thing I need to be able to do to write this script is figure out how to list all the directorys (these are not actual home directorys).
Im using solaris so that may complicate things for me.
ls -d only lists "." so that command is worthless.. for this.
find /path/to/users -type d ; somewhat works but it also lists every directory past users. I cant seem to find a way to tell it to only look in the one directory.the output is the following:
/path/to/user1
/path/to/user1/dir1
/path/to/user1/dir2
/path/to/user2/
/path/to/user2/dir1
/path/to/user2/dir2
I need to only see /path/to/user1 and /path/to/user2.
Anyone have any ideas on else I could try? Also, if it matters, Im using solaris to work on/write this script.. but the actual script will be for OSX, a post install script for an application upgrade.
Last edited by trey85stang; 05-15-2008 at 09:14 PM.
|