Search/Find File/Folder on Slackware Linux Command Line

April 8, 2020 | By the+gnu+linux+evangelist | Filed in: Tutorial.

Locating on Command Line

  1. 2. Checking Up

    Check if the updatedb Commad is on System’s Path
    With:

    which updatedb

    If is Not there you Should Find another More Specific Guide or Consult your Specific Distro Documentation.
    But if Missing it may be Installed as: mlocate.
    To Setup on Slackware use:

    sudo slackpkg install mlocate

    If Got “User is Not in Sudoers file” then see: How to Enable sudo

  2. 3. Updating locate DB

    Then to Update the Locate Database
    Play:

    sudo updatedb

    You need to Wait for a little while Until the Locate Database is Updated…

    This procedure Should be Repeated Every Time you Use the locate Command and your System made some Significant Change.

  3. 4. Searching on Command Line

    for a Simple Keyword Searching
    Try:

    locate [keyword]

    As for Instance, to Locate a Printer Ppd File:

    locate .ppd

    Whith this Syntax above you can Locate All Files, Directories, Images and Paths Containing the Given “keyword”.

    How to Automatically Update the locate Database

    Setup Cronjob for updatedb
  4. 5. Refining Search with grep

    How to Refine your locate Search-Results

    How to Use grep with locate

Contents


Tags: , , , , , , , ,

QuickChic Theme • Powered by WordPress