• wildbus8979@sh.itjust.works
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    2 days ago

    You’re confusing the command again

     -L, --listfiles package-name...
                   List files installed to your system from package-name.
     -S, --search filename-search-pattern...
                   Search for a filename from installed packages.
    

    dpkg -S /my/file/path

    Finds which, installed, package installed the file.

    dpkg -L samba | grep .conf

    Greps through the list of files installed by a given package.

    If the file you want isn’t in there then it wasn’t installed by the package itself (could be created on the fly by the binary for example), in which case obviously the package system can’t track it.

    • Lv_InSaNe_vL@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      3 days ago

      Oh I see, this command didn’t really do what I wanted it to do then. I just wanted to be able to see the locations of any files associated with a program. If I knew the file path I could just find them haha

        • Lv_InSaNe_vL@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          3 days ago

          Here is the entire output I get when I get that command.

          username@server:~$ dpkg -L samba /usr/share/doc/samba/examples /usr/share/doc/samba/examples/LDAP /usr/share/doc/samba/examples/LDAP/README /usr/share/doc/samba/examples/LDAP/get_next_oid /usr/share/doc/samba/examples/LDAP/ol-schema-migrate.pl /usr/share/doc/samba/examples/LDAP/samba-nds.schema /usr/share/doc/samba/examples/LDAP/samba-schema-FDS.ldif /usr/share/doc/samba/examples/LDAP/samba-schema-netscapeds5.x.README /usr/share/doc/samba/examples/LDAP/samba-schema.IBMSecureWay /usr/share/doc/samba/examples/LDAP/samba.ldif /usr/share/doc/samba/examples/LDAP/samba.schema /usr/share/doc/samba/examples/LDAP/samba.schema.at.IBM-DS /usr/share/doc/samba/examples/LDAP/samba.schema.oc.IBM-DS /usr/share/doc/samba/examples/logon /usr/share/doc/samba/examples/logon/genlogon /usr/share/doc/samba/examples/logon/genlogon/genlogon.pl /usr/share/doc/samba/examples/logon/mklogon /usr/share/doc/samba/examples/logon/mklogon/mklogon.conf /usr/share/doc/samba/examples/logon/mklogon/mklogon.pl /usr/share/doc/samba/examples/logon/ntlogon /usr/share/doc/samba/examples/logon/ntlogon/README /usr/share/doc/samba/examples/logon/ntlogon/ntlogon.conf /usr/share/doc/samba/examples/logon/ntlogon/ntlogon.py /usr/share/doc/samba/examples/printing /usr/share/doc/samba/examples/printing/VampireDriversFunctions /usr/share/doc/samba/examples/printing/prtpub.c /usr/share/doc/samba/examples/printing/readme.prtpub /usr/share/doc/samba/examples/printing/smbprint.sysv /usr/share/lintian /usr/share/lintian/overrides /usr/share/lintian/overrides/samba /usr/share/man /usr/share/man/man1 /usr/share/man/man1/log2pcap.1.gz /usr/share/man/man1/mvxattr.1.gz /usr/share/man/man1/oLschema2ldif.1.gz /usr/share/man/man1/profiles.1.gz /usr/share/man/man1/sharesec.1.gz /usr/share/man/man1/smbcontrol.1.gz /usr/share/man/man1/smbstatus.1.gz /usr/share/man/man8 /usr/share/man/man8/eventlogadm.8.gz /usr/share/man/man8/nmbd.8.gz /usr/share/man/man8/pdbedit.8.gz /usr/share/man/man8/samba-bgqd.8.gz /usr/share/man/man8/samba-gpupdate.8.gz /usr/share/man/man8/samba.8.gz /usr/share/man/man8/samba_downgrade_db.8.gz /usr/share/man/man8/smbd.8.gz /usr/share/samba /usr/share/samba/admx /usr/share/samba/admx/GNOME_Settings.admx /usr/share/samba/admx/en-US /usr/share/samba/admx/en-US/GNOME_Settings.adml /usr/share/samba/admx/en-US/samba.adml /usr/share/samba/admx/ru-RU /usr/share/samba/admx/ru-RU/GNOME_Settings.adml /usr/share/samba/admx/samba.admx /usr/share/samba/mdssvc /usr/share/samba/mdssvc/elasticsearch_mappings.json /usr/share/samba/update-apparmor-samba-profile /var /var/lib /var/lib/samba /var/lib/samba/printers /var/lib/samba/printers/COLOR /var/lib/samba/printers/IA64 /var/lib/samba/printers/W32ALPHA /var/lib/samba/printers/W32MIPS /var/lib/samba/printers/W32PPC /var/lib/samba/printers/W32X86 /var/lib/samba/printers/WIN40 /var/lib/samba/printers/x64 /usr/share/bug/samba/presubj /usr/share/bug/samba/script

          Now, if I grep those commands, I get these outputs

          username@server:~$ dpkg -S samba | grep "smb.conf" samba-common: /usr/share/samba/smb.conf samba-common: /usr/share/doc/samba-common/examples/smb.conf.default python3-samba: /usr/lib/python3/dist-packages/samba/gp/gp_smb_conf_ext.py

          username@server:~$ dpkg -L samba | grep "smb.conf" username@server:~$

          And these are copy and pasted straight from my terminal.

          • wildbus8979@sh.itjust.works
            link
            fedilink
            arrow-up
            2
            ·
            edit-2
            3 days ago

            Like I said, it obviously can only track files installed by the package, if the conf was generated by the executable after, or if you created it, the package system cannot know about it.

            Also, you’re still using -S wrong. It takes a file path as argument, not a package name. And does the opposite of -L by showing you which installed package, if any, owns an existing file.

            • Lv_InSaNe_vL@lemmy.world
              link
              fedilink
              arrow-up
              2
              ·
              3 days ago

              And like I said

              this command didn’t really do what I wanted it to do then

              I just want to do something like find {package name} | grep "config.conf" or something like that. I normally know what the program is called, I just don’t know where it is located.

                • Aceticon@lemmy.dbzer0.com
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  arrow-down
                  1
                  ·
                  edit-2
                  2 days ago

                  That person wants to find a file used by a certain package.

                  You gave them a command to find a file shipped in a certain package.

                  Those are not the same things so no, you did not gave them what they wanted, as they clearly demonstrated by showing you that a file that they know is used by a certain packaged is not listed by the command you gave them when applied to that package.

                  You de facto did not solve that person’s problem yet have repeatedly insisted you did:

                  Are you an LLM?!

                  • wildbus8979@sh.itjust.works
                    link
                    fedilink
                    arrow-up
                    1
                    ·
                    edit-2
                    2 days ago

                    Re read their original.messsage. they specifically asked for, and I quote, “install paths”. You’re going to have to work on reading comprehension before accusing people of being LLMs.

                    Meanwhile, every single time they replied they used the command wrong… Provided the wrong value for the arguments. Despite the original instructions. Yeah, it didn’t work for them. That’s a skills issue.