[request-sponsor] Request Sponsor Bug : 6638873 :usermod -m could optimize the move
Avinash Joshi wrote: I just wanted to know how to rename a directory. For moving the dir, there is a built in function ret = move_dir(pstruct-pw_dir, dir, logname); which is defined in usr/src/cmd/oamuser/user/movedir.c Is there a similar function that renames a directory? If the new name is on the same filesystem, see the rename(2) man page. -- -Alan Coopersmith- alan.coopersmith at sun.com Sun Microsystems, Inc. - X Window System Engineering
[request-sponsor] Request Sponsor Bug : 6638873 :usermod -m could optimize the move
Avinash Joshi wrote: I just wanted to know how to rename a directory. For moving the dir, there is a built in function ret = move_dir(pstruct-pw_dir, dir, logname); which is defined in usr/src/cmd/oamuser/user/movedir.c Is there a similar function that renames a directory? If the new name is on the same filesystem, see the rename(2) man page. And if not, cobble something together with posix_spawn and mv(1). Casper