开发者

creating symbolic link from select file type in a folder

开发者 https://www.devze.com 2023-01-17 17:01 出处:网络
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

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

精彩评论

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

关注公众号