0

In a java code I could see some folder structure like com.oracle.semisal.abc

com.oracle.semisal.abc is like com/oracle/semisal/abc - where abc is the file name

but no idea where this path is in the server.

kindly provide me a command or script in ksh.

1
  • Can you run the code and then see what files (e.g. with strace or sysdig or such) the code attempts to open?
    – thrig
    Mar 21 '17 at 15:38
1

If I understood you right, you are having some Java code, where you are seeing the structure com.oracle.semisal.abc. That is not a file, neither a directory, that is a reference to another Java code, which may itself be a file.

But you are in the right path. Java artifacts, .jars, have a well-formed structure, and the artifct may include the external code in it. If you are having a .jar file, you could look for it with a package inspecting tool, a decompression tool or even with the jar tool itself: jar -xf example.jar.

So, my best best is:

  1. Open/extract your code artifact
  2. Examine it for a folder like com, which may include a folder called oracle and so on
  3. Be happy if you found what you were looking for :)
  4. (or else, go checking the other artifacts in project. It may include external .jar files, which may have what you are looking for)
1
  • Yes I am also thinking the same , because I already search such path in the directories, but there is no such combination.. Thanks.. hegez
    – TAT
    Mar 21 '17 at 15:07
0

Not knowing how Java works, I'll narrow this down to just answering the more generic question of how to find a certain path on the system.

If you'd like to locate the path com/oracle/semisal/abc anywhere in the filesystem you may try two approaches:

  1. locate abc | grep -F 'com/oracle/semisal/abc'

    This basically uses the locate database to find everything on the filesystem called abc. You then grep for the specific path in that output.

  2. find / -path '*/com/oracle/semisal/abc/*' -print

    This uses find to locate all files and directories with com/oracle/semisal/abc anywhere in their path. This will take longer to run and will produce more output (if the path exists at all), but will work if the path is not located where the locate command is able to find it (locate only looks at things accessible by all users).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.