Announcement

Collapse
No announcement yet.

No Such File!

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    You shouldn't use sudo to run locate, it's required for updatedb but not locate.

    The "message" that updatedb returns that it's worked is a lack of error messages and the return of your cursor. I suppose no one thought it worthy of a reply since it's usually called by a cronjob.

    What is searched or not by locate is contained in /etc/updatedb.conf:
    Code:
    PRUNE_BIND_MOUNTS="yes"
    # PRUNENAMES=".git .bzr .hg .svn"
    PRUNEPATHS="/tmp /var/spool /media /home/.ecryptfs /var/lib/schroot"
    PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre tmpfs usbfs udf fuse.glusterfs fuse.sshfs curlftpfs ecryptfs fusesmb devtmpfs"
    You can see by default, bind mounts, USB thumb drives (which mount under /media), all network drives, among others are not scanned by updatedb and therefore not available to locate. locate is a very basic utility. If you what more configurable and useful searches use "find" i.e.

    find / -type f -name "escp2-sx100"


    This assumes of course that you have the name correct.

    Please Read Me

    Comment


      #17
      I believe lp0 is a connection to a printer. Likely, if you "ls -l /dev/usb/lp0" you see permissions showing "crw------- 1 root root" which means its a "character" device not really a file. If you see "brw------- 1 root root" its a block device.

      Please Read Me

      Comment


        #18
        Originally posted by oshunluvr View Post
        You shouldn't use sudo to run locate, it's required for updatedb but not locate.
        Agree mostly, but locate won't show files to which the user doesn't have read access. If you know what the file is and that you have read access to it I agree completely, but if you don't know what it is, where it is or whether you have read access to it the only way to be sure is to use sudo.

        Check this out - my KDE config is copied to root's home directory for consistency.

        Code:
        wizard@wizard-laptop:/$ locate kdeglobals
        /home/wizard/.config/kdeglobals
        /home/wizard/.kde/share/config/kdeglobals
        /home/wizard/.local/share/RecentDocuments/kdeglobals.desktop
        /usr/share/kde4/config/kdeglobals
        /usr/share/themes/QtCurve/gtk-2.0/kdeglobals
        /usr/share/themes/oxygen-gtk/gtk-2.0/kdeglobals
        and...

        Code:
        wizard@wizard-laptop:/$ sudo locate kdeglobals
        [sudo] password for wizard: 
        /home/wizard/.config/kdeglobals
        /home/wizard/.kde/share/config/kdeglobals
        /home/wizard/.local/share/RecentDocuments/kdeglobals.desktop
        [B]/root/.config/kdeglobals
        /root/.kde/share/config/kdeglobals[/B]
        /usr/share/kde4/config/kdeglobals
        /usr/share/themes/QtCurve/gtk-2.0/kdeglobals
        /usr/share/themes/oxygen-gtk/gtk-2.0/kdeglobals
        we see things not as they are, but as we are.
        -- anais nin

        Comment

        Working...
        X