Posted on 2006-03-27
Last Modified: 2010-04-21
Hi Experts,

I need to find a directory called linu on a server. I know a couple of filename in that dir such as nuy.sql, nut.sql. Is there a quick and easy way to find this directory? I tired using below scripts. but it is very slow.

find / -name 'nu*'

Please help!!

Thanks! NW
Question by:nightworker
    LVL 84

    Assisted Solution

    find / -name 'linu' -type d
    LVL 45

    Accepted Solution

    Hi nightworker,

    find / -name linu -type d

    May be you can rule out a few directories such as home etc. for which you are sure that directory does not exist there.

    If location is not known, then there is no alternative to search ... background it and let it run for a while

    LVL 61

    Expert Comment

    You can use 'locate', which builds file database every week from cron or so.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
    Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now