Featured

    Featured Posts

Find command

The find command is used to search for files in the directory tree starting from the location specified. It searches your filesystem live, which causes the command to run slower than the locate command.
The syntax of the command:
find PATH EXPRESSION
The expression is a way of specifying what you want to find. You can search files by filename, size, permissions, group, UID, etc.
Here is a list of the most commonly used expressions:
linux find command options
We will go through a couple of examples. To find all files and directory that begin with “so” in our current directory, we can use the following command
linux find by filename
NOTE – wildcards like * have to be enclosed in double quotes to work with the find command.
To find files bigger then 300 bytes:
linux find by size
NOTE – when using the -size expression, use c for bytes, k for Kilobytes, M for Megabytes and G for Gigabytes
To find files owned by a user:
linux find by ownerr
To find files with specific permissions:
linux find by permissions
You can also combine two or more expressions:
linux find command multiple expressions
In the example above we have found all files that have the permissions of 775 and begin with the letter “t“.
author

Author Name

Author Description!

Get Free Email Updates to your Inbox!

Post a Comment

www.ccna.ma

yu
Powered by Blogger.

Translate

Copyright © Learn Linux Th3pro.xyz | Blogger Templates | Designed By Code TAOUSSI