We are moving home folders to the new file system, and I'm looking for a way to automate it using Perl or a shell script. I don't have much choice in programming languages, since systems are proprietary storage clusters that should remain unchanged as much as possible.
Task: In the directory / home / I have the home folders of different users aaa, bbb, ccc, ... and they have certain access rights and the rights of the user / group, which should remain intact when going to / newhome /. Here is an example of what you need to migrate from / home:
drwxr-xr-x 3 aaaaa xxxxxxxxx 4096 Feb 26 2008 aaaaa/
drwxrwxrwx 88 bbbbbbb yyyyyy 8192 Dec 16 16:32 bbbbbbb/
drwxr-xr-x 6 ccccc yyyyyy 4096 Nov 24 04:38 ccccc/
drwxr-xrwx 36 dddddd yyyyyy 4096 Jun 20 2008 dddddd/
drwxr-xr-x 27 eee yyyyyy 4096 Dec 16 02:56 eee/
Thus, the same folders with permissions and owners must be created in / newhome. Copying / moving files should not be a concern, as this will be processed later.
Has anyone worked on such a script? I'm really new to Perl, so I need help.
source
share