Home > Commands, Linux > Linux – Find Command

Linux – Find Command

The find command is used to find files and directories on a linux/unix system. It will search any set of directories that you specify for files/directories matching a given search criteria. You can search by name, owner, group, type, permission, date, and other criteria. Search is recursive and will search the specified directory and its subdirectories providing the user has permission to view the contents of that directory.

Find all files in current directory and it’s sub-directories

Find followed by a . will search for all files in the current directory and it’s sub-directories and print the output.

dgoh-data-01:oracle@OASLIVE1 > find .
.
./initOASLIVE.ora
./OASLIVEpostupgrade.ora
./spfileOASLIVE.ora
./OASSTBY.stby
./stats_gather.log
./updateusers.sql

Find all sub-directories within the current directory by given owner

If you want to find all sub-directories of the current directory with the owner ‘Oracle’ then you would execute the following command:

$  find . -type d -user oracle -ls

Advertisements
Categories: Commands, Linux Tags: , ,
  1. July 20, 2013 at 8:43 AM

    Nice blog here! Also your website loads up very fast!
    What web host are you using? Can I get your affiliate link to your host?

    I wish my website loaded up as fast as yours lol

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: