h*********s 发帖数: 14 | 1 I have 10 directories under my home directory, named dir1-dir10. Under each
directory, there is one text file named dirX.txt, where X is the index of the
directory. e.g, dir1.txt is under dir1/ and dir6.txt is under dir6/. I have
another directory called alldata under my home directory too.
My question is how can I build a soft link for all those 10 text files
(dirX.txt) under alldata/ directory by some simple command instead of link
them one by one by hand. I am thinking of using find command b | c**t 发帖数: 26 | 2 use perl or cshell, it's simple
【在 h*********s 的大作中提到】 : I have 10 directories under my home directory, named dir1-dir10. Under each : directory, there is one text file named dirX.txt, where X is the index of the : directory. e.g, dir1.txt is under dir1/ and dir6.txt is under dir6/. I have : another directory called alldata under my home directory too. : My question is how can I build a soft link for all those 10 text files : (dirX.txt) under alldata/ directory by some simple command instead of link : them one by one by hand. I am thinking of using find command b
| q*z 发帖数: 13362 | 3
the
in alldata dir
find .. -name 'dir*.txt'-printf 'ln -s %p `basename %p`'|sh
【在 h*********s 的大作中提到】 : I have 10 directories under my home directory, named dir1-dir10. Under each : directory, there is one text file named dirX.txt, where X is the index of the : directory. e.g, dir1.txt is under dir1/ and dir6.txt is under dir6/. I have : another directory called alldata under my home directory too. : My question is how can I build a soft link for all those 10 text files : (dirX.txt) under alldata/ directory by some simple command instead of link : them one by one by hand. I am thinking of using find command b
|
|