Scenario is to replicate all the directories,sub-directories,files,symbolic links present in Linux development Server to Linux QA Server.

Lot of unix users also to be created.

Consider an unix user - edwprod , there are lot of sub-directories and soft link present inside this folder /home/edwprod/.

-rwxrwxrwx 1 edwprod  edwprod     0 Jan 25 13:23 ksh
lrwxrwxrwx 1 edwprod  edwprod    32 Jan 30 06:30 output -> /apps/application_scripts/output
lrwxrwxrwx 1 edwprod  edwprod    30 Jan 30 07:02 wp37 -> /apps/application_scripts/wp37
lrwxrwxrwx 1 edwprod  edwprod    32 Jan 31 05:57 in_dir -> /apps/application_scripts/in_dir
lrwxrwxrwx 1 edwprod  edwprod    30 Jan 31 10:57 SVEN -> /apps/application_scripts/SVEN
drwxrwxrwx 6 edwprod  edwprod  1024 Feb  1 08:45 bin

This is how the directory looks like. All the directories reside inside folder /apps/application_scripts/.

Both the directory tree should be replicated in Linux QA Server without affecting the symbolic links. Let me know the best possible way to do it?

migrated from stackoverflow.com Feb 7 '12 at 9:47

This question came from our site for professional and enthusiast programmers.

  • I indented your code. Not sure, what the last line /home/edwprod> after the output of ls means. – Tichodroma Feb 1 '12 at 9:58
  • when u replicate the directories in new server , symbolic links , files get crashed and become invalid. – AruM Feb 1 '12 at 10:03


Use useradd with the original data (uid, gid, encrypted pw, ...) to recreate the user on the target system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy