开发者

creating symbolic link from select file type in a folder

i have a folder with many different types of files...but i want to create a symbolic link of only files that are of a cer开发者_如何学Ctain file type (the data files with extension *.txt.mrg) in this case...i want to have the same file names for the symbolic links as the original files...how do i do this? i want to be able to create all the symbolic links in one command for that file type.


find /your/source/dir/ -iname '*.txt.mrg' -exec ln -s '{}' /your/dest/dir/ \;

Warning: to make this one-liner work, you must use absolute paths.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜