In bash
, say I want to link some but not all files from a directory, e.g.,
ln -s /dir/file1 /dir/file2 ... /other/dir
but the format of the names of the files do not follow some simple rule, so we can't use something like
ln -s /dir/file* /target/dir.
Is there anyway to not repeat /dir
, something like:
/dir/{file1 file2 ...} = /dir/file1 /dir/file2 ...
so we can do something like:
ln -s /dir/{file1 file2 ...} /target/dir