1
I am trying to find the path of a file just knowing its name. I have tried several ways including pwd
but it’s no use to me. There will be some way to do it ? (I have assurance that this is the only file with that name , so there are no different paths)
What file do you want to get the address from? has some code started?
– Brumazzi DB
You can use the features of your Operating System. For example, to find a file named "FOO.BAR" in Windows (search inside the current directory):
dir /s /a /b foo.bar
; in Un*x (search from the root):find / -iname foo.bar
.– pmg
You need to be more specific with your question: 1) do you want to find a file in a directory tree? - 2) Do you want to know the complete path of a given file ? - 3) Do you want to know the base directory of a given file?
– Lacobus