这应该这样做:
cd Directory; find * -type f -print0 | xargs -l -0 bash -c 'filename=`echo "$0" | tr '/' -`; ln -s $(pwd)/$0 ../DirectoryDest/$filename'
这将产生这些文件:
user@machine:~$ ls -l DirectoryDest/
total 0
lrwxrwxrwx 1 user user 51 Jul 27 23:02 DirectoryA-DirectoryAA-FileAA1 -> /home/user/Directory/DirectoryA/DirectoryAA/FileAA1
lrwxrwxrwx 1 user user 51 Jul 27 23:02 DirectoryA-DirectoryAA-FileAA2 -> /home/user/Directory/DirectoryA/DirectoryAA/FileAA2
lrwxrwxrwx 1 user user 38 Jul 27 23:02 DirectoryA-FileA1 -> /home/user/Directory/DirectoryA/FileA1
lrwxrwxrwx 1 user user 38 Jul 27 23:02 DirectoryA-FileA2 -> /home/user/Directory/DirectoryA/FileA2
lrwxrwxrwx 1 user user 38 Jul 27 23:02 DirectoryB-FileB1 -> /home/user/Directory/DirectoryB/FileB1
lrwxrwxrwx 1 user user 38 Jul 27 23:02 DirectoryC-FileC1 -> /home/user/Directory/DirectoryC/FileC1
lrwxrwxrwx 1 user user 38 Jul 27 23:02 DirectoryC-FileC2 -> /home/user/Directory/DirectoryC/FileC2
lrwxrwxrwx 1 user user 38 Jul 27 23:02 DirectoryC-FileC3 -> /home/user/Directory/DirectoryC/FileC3