Skip to main content
6 events
when toggle format what by license comment
Dec 14, 2017 at 17:12 comment added Joe Yes indeed I'm using my above reported version based on "find". find command automatically filters just the existing files. Moreover it allow to refine the selection of the files which to create the links to (based on certain pattern in their name for example). And it allow subdir exclusion too, by the "-path $DIRTOEXCLUDE -prune". Anyway I asked just to understand the wildcard behavior along the symlink command ln. A remark: with hardlink there isn't any problem... but hard link and symlink are not the same... Thank you for suggests! :)
Dec 14, 2017 at 16:33 comment added Chris Davies @Joe ln -s will create a symbolic link to anything, whether or not it exists. This isn't really "unusual behaviour", but you might prefer in this instance that ln -s didn't do that.
Dec 14, 2017 at 16:30 comment added Chris Davies @Joe be very careful with your locale if you're expecting [a-z] to miss your uppercase TXT directory. Check with echo [a-z]*.
Dec 14, 2017 at 13:23 comment added Joe The problem could poup up if a source subdir doesn't contain any *.txt file. In that case will be created an unwanted broken link in TXT named *.txt. This problem occurs also with the cd solution... That is the usual behavior of ln command, anyway should be better to create the link just in case the linked file really exists...
Dec 14, 2017 at 13:22 comment added Joe for f in [a-z]*/*txt should solve in my case: I can name the files subdir (a, b in the example) as I prefer: I can choose names beginning in lowercase letter [a-z] and target dir TXT in caps.
Dec 14, 2017 at 12:36 history answered Chris Davies CC BY-SA 3.0