Asking this question on mpv player and dvds, I stumbled into a more generic question: is it generally possible to specify a path in which one of the directory names is variable?
Let's say that I want to execute a file with a command. The executable is in /dir1/dir2/dir3/
, but the name of dir2
is variable, although it will always contain dir3
(similar to VIDEO_TS
, which is always similar to /media/username/NAME-OF-DVD/VIDEO_TS/
while NAME-OF-DVD
varies).
If I want to execute that file with a command I have to specify the path. Can a such command be used (with a path in which one directory-name may be "generic")?
/dir1/dirX/dir3/dir4
and thedirX
part is not changing likedirX/dirY/dirZ
but can only be one of thedirX
,dirY
ordirZ
, then you can reference/dir1/dirX/dir3/dir4
as/dir1/*/dir3/dir4
– MelBurslan Feb 18 '16 at 16:15mpv /media/username/*/VIDEO_TS
does what I want. – Feb 18 '16 at 16:20