0

in usual Linux , to find a file in PATH , we use which

$ which git
/usr/bin/git

but in void linux , i got :

/sbin/git

how can i get the real directory of my file in my path ?

nextloop
  • 136
  • 1
  • 3
  • 14
  • 3
    How is that a problem? Is the file not in /sbin/git? – Jakub Lucký May 07 '21 at 18:24
  • Side note: [Why not use `which`? What to use then?](https://unix.stackexchange.com/q/85249/108618) – Kamil Maciorowski May 07 '21 at 18:31
  • the main problem that i'm install lua53, but not working , but old origin realse of lua is worked, also jdk is automaticaly install to /sbin/java, i can't manage deferent version if system hide my new app from path – nextloop May 07 '21 at 23:15
  • check to see if the lua53 installer has an option, or config file, to specify where to find git. or, if the installer is a script, edit it. or just make a symlink `ln -s /sbin/git /usr/bin/`. – cas May 08 '21 at 02:11

1 Answers1

1

Different distributions put some files in different places. That's normal, just go with whatever you find in void-linux and don't worry if its in a different place than you are expecting to see it compared to another distribution . The only caveat would be if you suddenly find it in a real oddball location like /tmp or your home directory.

If its a standard utility installed by void-linux and its not in /usr/sbin, /bin (or their sub-directories) then question its authenticity and ASK about it before executing it.

Cat22
  • 11
  • 1